Editor-connected REPL for beginners

I am not sure what is meant by editor connected REPL integration. But I recently published an extension to VS Code that has some kind of REPL integration. I call it Calva, because it is made from Cider (and nrepl). It supports inline eval, running namespace tests, navigate to definitions, peek at definitions, auto completions and some more. A feature is that it lets you easily switch between backing clic files with the cli or the cljs repl.

It also starts repls in VS Code’s integrated terminals and lets you load the current namespace there and can send code there for evaluation. These repls are a bit clunky compared to Emacs Cider, but it’s a start.

At current Calva does not try to start the nRepl environment, but rather connects to an existing one. It makes it a two step process for jacking in, but makes it easier to keep it somewhat tool agnostic. (I added support for shadow-cljs today.)

I tried with Clojure CLI/deps.edn and it works with that too, at least the Clojure part. I couldn’t figure out how to make Figwheel work in that environment yet.

You find Calva here:

https://marketplace.visualstudio.com/items?itemName=cospaia.clojure4vscode

Full disclosure: I’m in a bit over my head with this project because I am pretty new to the Clojure world. Emacs Cider is wonderful, but a bit too heavy for my Macbook. I probably should have turned to VIM Fireplace, but fell in love with VS Code. Anyway, I would be happy to learn what you think about Calva in respect to how it could support beginners.

3 Likes