Fork me on GitHub
Brady Pierce05:09:50

I'm trying to jack in using Calva, however the output window that is brought up is only a text file, and not actually a repl. Does anyone know how I can fix this? I tried first running lein repl and then connecting however still no luck.


That text file will display the repl output if you e.g. eval a form in a clj file open in your workspace


I think you can also alt+enter a form in the text file and it should eval there.


That looks correct. The text file is connected to the repl. Best to evaluate from your source files, like @chuck.cassel suggests. But you can evaluate code in the text file as well.

Brady Pierce05:09:11

I'm able to evaluate the current form and have the output displayed in that output window. The problem I'm having is that I cannot directly type in a new form to that window and then evaluate it, I can only send existing code to the repl from the editor. Is this the expected behavior?


No, you should be able to type in that window. Are you not?

Brady Pierce16:09:21

I can type in the window, I just can't evaluate new forms in it. I can only send and evaluate one if it's from the editor. I can't for example input (+ 1 1) in the window and get back 2


If you type (+ 1 1) and hit alt+enter, what happens?


We try to describe what to expect from the output/repl window here:

Tom Helmuth15:09:44

I'm teaching a college class using VS Code and Calva for Clojure. I have a student on Mac who is having tons of trouble getting Calva to launch a leiningen repl. Every time she tried to jack-in, she gets the error:

/bin/bash: lein: command not found
We tried two different installations of leiningen, both through homebrew and by downloading the lein script directly, restarting VS code after every attempt, and all of them resulted in this error. I double and triple checked that lein is on her PATH, and her terminal had no problem finding and running it. Any ideas?


Man, I wish we had been taught Clojure in college!


That's great


@trhtom i think it can be that vscode starts with a different environment than the one she has at the terminal. If she installs the code command line executable (I think vscode has a command for it) and starts vscode that way instead of via the app icon, maybe that will work better. Please let us know how ir goes.

Tom Helmuth15:09:30

Ok, we'll give that a shot, thanks!

Tom Helmuth15:09:27

This worked perfectly, thanks! If anyone else runs into this, here's the VS Code instructions for installing the command line executable on Mac:

Tom Helmuth15:09:42

Thanks a bunch @pez

❤️ 3
calva 6