Fork me on GitHub
#calva
<
2019-06-07
>
sasho.popov06:06:46

I’ve been using the new CLJ REPL window and I like it, however, one thing that bothers me is this - when I execute a command, very often I want to edit it just one bit and execute it again. So I’d hit ⌥+↑ and the previous command appears. No I want to jump to the middle of the command. Normally I’d use ⌥+← for this, which jumps the cursor one word at a time. However, this doesn’t work in the current window and I have to use the mouse to place the cursor where I want it.

pez07:06:43

I agree, @sasho.popov, please file it as a feature request.

dennisa07:06:57

I've got this issue on the Mac at home. Jack-in or connection to running nRepl starts fine. Then after about 5 to 45 min the connection to the nRepl drops. Killing terminal and restarting Jack-in is not helping. In the status bar there's a message "Activating extension", but nothing is happening. The only quick way to resolve this is to call 'Reload window' from the command palette. Does anyone experience the same?

pez07:06:04

Sounds like the js app is not releasing some resource properly. What more can you tell us about your setup and reproduction steps?

ivana09:06:01

Hello! Today my Calva says that she is legacy now and I replace she by a new one, younger and prettier. But I just can not connect to running repl with she. Previous calva opened connection window with prefilled localhost: hint and all I need to do was type my opened repl port number. But new one shows me a complex menu and I can not connect anyhow I try 😞

ivana09:06:46

So I returned to my old legacy but working Calva. And I am afraid that one time she will unavailable...

pez09:06:59

What’s in the complex menu she shows you?

ivana09:06:23

So let me install the new one and show

ivana09:06:54

and now I does not auto-opened on open clj file, like with old Calva was

pez09:06:06

Which option did you choose in the first menu?

pez09:06:54

Or, in all the menus for that matter.

ivana09:06:47

I tried to choose any option and type my port number with or without localhost: prefix

ivana09:06:28

I just researched that if I press esc 2 times this complex window transforms to the old view but after typing port number another repl window opens in VScode but nREPL label is still off and repl is disconnected

pez09:06:27

So, the option that is supposed to work as the legacy Calva is “Connect to a running REPL server”. What happens when you choose that? You get menu 2, right?

pez09:06:31

Also I wonder what happens if you follow the instructions in the new README. But we can try figure this one out first.

pez09:06:00

What kind of project do you have?

ivana09:06:13

But which types are exists? I have deps.edn file and with legacy Calva started 2 terminals outside VScode - one for clj part nrepl and second for figwheel

pez09:06:14

So it is a deps.edn + fiwgheel project? Is it Figwheel Main or legacy Fighweel?

ivana09:06:14

And connected with Calva to nrepl but figwheel refreshed all changes by himself

pez09:06:50

Are you on Windows, or Mac, or Linux?

ivana09:06:54

I think it is legacy Fighweel, but I dont want any figwheel interactions with Calva - Figwheel works alone in his terminal session and do not bring me any problems - I just change any file in any editor and he reload all the changes automatically

ivana10:06:15

I do not dream about cljs repl

ivana10:06:31

I am on Mac

pez10:06:32

Yeah, Calva will let fighweel do its work, just as before.

ivana10:06:43

Good news

pez10:06:10

You just need to help it connect. So choose Figwheel in the second menu and see if that works?

ivana10:06:14

The same thing - repl window opens in VScode but nrepl still disconnected

pez10:06:44

(Assuming you have started the stuff in your two terminals outside of VS Code as you did before.)

ivana10:06:16

now only nrepl part, without figwheel

ivana10:06:31

is it critical for nrepl connection?

pez10:06:09

I think that if you have tried a few times you might not have the correct .nrep-port file and such. Try re-starting the repls and then connect Calva.

pez10:06:29

If you really don’t want to be able to interact with the cljs repl, you can choose None in the menu asking for cljs type.

ivana10:06:36

I think if I type port number manually I am not need .nrepl-port file, but I'l try

pez10:06:09

If it doesn’t pick up the .nrepl-port, then something is wrong.

pez10:06:51

I recommend you let Calva start the project repls for you, however. That way you won’t have to keep track of what dependencies Calva needs.

pez10:06:59

Also I think we should write some guide for people upgrading from legacy to the new one and try front that on startup somehow…

ivana10:06:56

I have a makefile with lot of group commands for starting this project and start command also starts nrepl. I can change this file but all others works with this project on spasemacs and I am afraid I can break their work

pez10:06:17

OK. That might make the old style connect your option. Have you gotten it to work again?

ivana10:06:43

With new Calva - unfortunately not

ivana10:06:03

repl window opens but nrepl is disconnected

pez10:06:53

Do you have the time for a hangout session?

ivana10:06:21

Yes, if you have time too

pez10:06:35

Let’s! I’ll PM you.

pez10:06:16

Cool! Now I know a bit more about Calva out in the wild. 😃

ivana10:06:45

Thanks alot, @pez

pez11:06:52

Another option @ivana, is to skip starting the repl from that make task, and let Calva do that for you instead. Less maintenance.

pez11:06:21

I think you will discover some more features of Calva now, also. I doubt code navigation and definition look-up worked with those ancient dependencies.

ivana12:06:39

Yes, you are right - I trying run all my make commands that was before nrepl start, than starting repl inside Calva and it works. But in this case I have to run all make commands that was after starting repl - for example, starting the project itself. And I have the same scenario with starting tests and other complex commands in makefile. But now I have a way to dig, thanks!

ivana14:06:15

First impression of new repl window - it seems that it is useless in current state. It shows colored clojure output, but I can not select and copy-paste any from it. I find a way - close this calva repl window after connection and eval all forms in editor inplace, and even if theirs results are long, they fortunately are duplicates in Calva output window, so separate repl window does not needed for any purpose

ivana14:06:10

But unfortunately it reopens every time I load new namespace and resets the cursor focus on himself 😔 Its a pity that one can not get rid of it anyhow...

firstclassfunc15:06:54

Hey, thanks for great work. Is there any doc on the Calva workflow for shadow-cljs I am getting an error with npx

pez15:06:59

Welcome, @firstclassfunc!

pez15:06:06

What error do you get?

pez15:06:54

@ivana how do you load a new namespace? (I mean, what do you do when you do that?)

pez15:06:38

Selection of output from the repl window is pretty borked, yes. I wonder when I broke that…

firstclassfunc15:06:50

thanks @pez

> Executing task in folder dci: /usr/local/bin/npx <


ERROR: You must supply a command.

Execute binaries from npm packages.

  npx [options] <command>[@version] [command-arg]...

  npx [options] [-p|--package <package>]... <command> [command-arg]...

  npx [options] -c '<command-string>'

  npx --shell-auto-fallback [shell]

ivana15:06:14

@pez I just select new opened file clicking on its tab and when cursor is focused on its text press hotkey for load current namespace in repl window - it loads and repl window opened (if it was closed) and everytime catches cursor focus so I have to click on selected file again to restore the focus

ivana15:06:13

the same thing about focus is on send current form to repl window

pez15:06:33

The key words there are in repl window 😃

ivana15:06:16

hm... Are there the same commands but with normal behaviour? ) I'l check )

pez15:06:36

There is Load current file or something.

ivana15:06:55

Great, thanks! I'l try

pez15:06:04

But I will fix selection again, fyi.

ivana15:06:52

It would be great too, cause in this case repl will can be usable )