clojureVSCode
clojureVSCode copied to clipboard
Support for boot when connecting to a running nrepl
From @pdkovacs at #47:
Hmm, after following the boot-related config steps described in https://github.com/boot-clj/boot/wiki/Cider-REPL (more specifically fixing ~/.boot/profile.boot described in A better way / point 1.), everything works nicely for me.
After working some more with VS Code, it turned out that code completion doesn't work for me with a Boot REPL after all. With the plugin's built-in REPL starter, code-completion seems to work, but as I currently have my project configurations in Boot, I cannot really use it for testing.
In addition to the user-global profile, I mentioned in my previous comment, I have my project specific Boot settings as in https://github.com/pdkovacs/clj-todo .
Thinking about what might have solved the actual issue at hand for me, I have removed something (sorry, I don't remember anymore exactly what it was) from ~/lein/profiles.clj. It is currently at the bare minimum of:
{:user {:dependencies [[org.clojure/tools.nrepl "0.2.13"]]} } Let me know if I can help any more with this.
This is also related with #31.
After reading more attentively https://github.com/boot-clj/boot/wiki/Cider-REPL , I realised that to get the same editing support with Boot as with the plugin's built-in REPL starter, REPL has to be started with cider like
boot cider repl
instead of just
boot repl
.
Hmmm nice!
Do you still need to add a dependency to profiles.clj
in order to get the extension working?
The built-in REPL starter works without problem, even if I completely remove ${HOME}/.lein/profiles.clj
.
Yup. That's one of the benefits of using it. This issue is for those who, for whatever reason, want to connect to an already running nREPL started with boot.
One useful improvement would be the ability to configure the plugin so that it first try connecting to an already running REPL.
Another way to help Boot users would be to provide setting(s) to tell the plugin how to run the REPL. The plugin could eventually let the user specify the entire command line — which would be
boot cider repl
in the case of Boot users.
When we didn't have the ability to run our own nrepl, we used to try connecting to an already running nrepl. But we have to remember that those need to have dependencies configured (at least for lein). So I don't think prioritize already running nrepls make sense.
As for your second point, that would end up being our own nrepl, but run on top of boot instead for lein. For now, we only support lein, but we can try to use lein or boot (depending on what is installed on the users machine).
@avli The point of this issue was to explicit the dependencies required when connecting to an already running nrepl (either using lein or boot), like we used to have in README. I think we should make a page in our wiki for that.