@mynomoto, I’m the maintainer/developer of Calva and think it has some edge over Lisin’s Clojure, (obviously, otherwise I wouldn’t have created a new one). I don’t remember exactly why it fell short for me, but anyway. But Calva is very new (even if it’s based on a more mature extension). I’d be happy if you gave it a try and let me know how it works for you. Calva is trying to make it a bit more Emacsy to work with Clojure and Clojurescript. I have tried to make it easy to work with cljc
files and toggle wether they are backed by a clj
or a cljs
REPL. It integrates the REPL as tight as I have been able to do it so far and lets you evaluate code “in” the editor as well as use the REPL to edit the code (eval replace). You can run and rerun namespace tests (and have failures marked in the Problems tab/editor). It also opens up two connected REPLs (one for Clojure and one for Clojurescript (if ) in the terminal tab and has commands to swith to the current edited namespace and load it and send code to be evaluated from the editor to those REPLs.
@wmichaelshirk @pez Thanks! Do you know if it works with shadow-cljs? I'm a vim user myself but I have a colleague that uses vscode and I'm helping him on setup. Parinfer works fine but we did not try to connect to a shadow-cljs repl yet.
Currently it is quite painful to run all tests of a large project, because Calva does not report back until all are run. I will try to fix that asap, but need to figure out some things about sockets programming to get it done.
@mynomoto I have just recently heard about the term shadow-cljs
. What is it? 😃
(I’m afraid that might mean Calva does not support it yet, but I’d be happy to consider working on that.
It's an alternative compiler for clojurescript. I think that the repl is pretty standard as I just connect to it like to a figwheel one from vim. But the .nrepl-port is not on the same path as lein or boot so I need to be able to manually connect to a repl. Is that possible?
You can manually connect. Where is the .nrepl-port file located?
I’ll give it a try now. 😃
.shadow-cljs/nrepl.port
Inside the project.
hello folks, running calva for the first time
not a VS code user myself
how to display the Terminal REPLs window?
@mynomoto Alright, so I have tried Calva with shadow-cljs some now. It doesn’t work . I don’t quite understand why and am looking at it to see if I can figure it out.
@richiardiandrea do you see the OUTPUT tab/window?
@richiardiandrea Calva has some commands for interacting with the Terminal REPLs, I think all of them opens the TERMINAL tab and shows the REPL there. In VS Code you can access all commands using cmd+shift+p
(mac, I think it is ctrl+shift+p
on windows). From there you can search for commands.
I see output but I don't see online evaluation
Also if I launch my own command at the repl
Then how to connect?
Not sure what you mean. How do you start the REPL? Calva needs it to be started before it can connect.
Yep I start it from the terminal inside vscode
I see nrepl.port
The connection code is a bit buggy. But ctrl+alt+v c
should connect you when you have that file (it will show a small prompt at the top of the window that you need to submit).
I recommend starting the repl in a terminal outside of Code before opening the project, but if you prefer to use the internal terminal you probably should tell Calva not to try to autoconnect (there is a setting for that).