Fork me on GitHub

A CLJS nREPL server? I must pinch my arm.


For now I'm targeting node/lumo but eventually any javascript runtime with tcp should work. I got calva working with nrepl-cljs by pretending it was nashhorn.


I guess calva checks for a specific string before it trusts its actually a cljs nrepl server.


"To quit, type: :cljs/quit"


That's configurable, but yes, by default it waits for that string before it considers the connection complete.

👍 4

We will need to modify Calva a bit to support this in a smooth way. And I am eager to do those modifications! 😃


I already pulled down the calva repo for debugging through the first problem. I'm down to pull down any test branches to see how it works :thumbsup:


Today Calva makes quite a big assumption that it is connectiong to a CLJ server. To create a sensible Ux we will need to remove that assumption. Which I think might be a pretty heavy rewrite. But also, it isn't all that much code, so should be within reach.


Here's a branch where I have started adding a generic project type. Still CLJ and all that, but anyway. I can connect smoothly to babashka's nrepl server at least.

thanks 4

Thinking about it.... It should be possible to connect to your CLJS repl there, using that branch. Calva will think it is a CLJ repl, but if the files are named as .cljc it would work.


As for querying the language from the server, as @bozhidar says, there hasn't been a need for that yet. 😃 But even so, Calva can check the project files and ask the user.


(If I understand the question correctly.)


@borkdude Feel free to also directly update the library. Probably it’s a good idea to retain compatibility with older Clojure releases, as there is still some usage of Clojure 1.7/1.8 in the wild.


Adding cljs support would be awesome 😄


Since you can't block on reads in cljs, the api can't be the same


Well, I guess that’s fine. It can very well be a different library then.


As long as it serves the purpose the API doesn’t matter that much.