Fork me on GitHub

Good point. There should at least be a way to opt out.


Hello, just trying to get Calva working in a Clojure project that’s using deps. From here ( I think I have to have this in my deps.edn

{:repl {:plugins [[cider/cider-nrepl "0.21.2-SNAPSHOT"]]
        :dependencies [[nrepl "0.6.0"]]}}
But then what terminal command is used to run the repl?


Ohh this is a lein thing for profiles.clj :woman-facepalming:


The closest I’ve come is using this deps.edn:

 {:cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.21.2-SNAPSHOT"}}
              :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]}}
and running with clj -A:cider-clj. That allows me to connect from the editor, but then this happens:


Have you evaluated the file before that? (Not sure why that would help, but I have seen this before...)


No, i hadn’t. I just did though, and then (+ 1 2) worked after that


The :require directive doesn’t include clojure.core though, so why would that help?


Ok, new info: - if I open a blank clojure file and put (+ 1 2) in it, it works right away - but in this existing clojure file that has an ns and requires a bunch of stuff, it doesn’t work unless the whole file has been evaled beforehand


@U0ETXRFEW Does that look like the correct way to run nrepl at the top of this thread?


I haven't quite understood it either, but I think that the system (the app, or how it should be understood) does not know about anything until it has loaded some code. Loading that file with an ns causes it to get ”woke” about clojure.core and things. But that file without an ns form gets evaluated in the user name space, which is magic, haha.


Yeah, that looks right. If you like you can try the alpha-build of Calva 2, which has support for cli/deps and does something similar to that to fire things up.


@U0ETXRFEW OK, weird 🙂 Sure, would love to give it a go. Is there an explanation anywhere for how to run it (bit of a Clojure noob here)?


It's a bit of vscode knowledge needed, rather. You'll find a VSIX package in the alpha-build dir of the dev branch at Github. Download that. Then in the vscode extensions pane use the small ... menu and choose Install from VSIX. I'd love to get some feedback on how it works. Trying to get it releasable within the following two weeks.


OK, I’ll give it a go 🙂


@U0ETXRFEW Just continuing this exploration, even though I can now evaluate (+ 1 2) (after setting the namespace), I still can’t do (doc +), and instead have to do (clojure.repl/doc +) How would you suggest loading the clojure.repl symbols into the current namespace? I thought evaluating (use clojure.repl) would do it but apparently not


Hmmm, that's a bit strange. Can you file it as an issue so that I can keep track of it?


(Also, you should have docs on hover, do you?)


>Can you file it as an issue so that I can keep track of it? Can do


> (Also, you should have docs on hover, do you?) This was something else I meant to ask you about. I have docs on hover and click to definition, but only for fully namespaced symbols.


That’s including for stuff defined in my own project and for stuff in clojure.core


Ask about it out in the channel. I'll be offline a while now, but maybe someone else can help.


(That also gives a bunch of warnings about “An illegal reflective access operation has occurred”)


These you can safely ignore for now (for a few years at least). It’s an issue with some libraries that aren’t fully compatible with the latest JVM, but they still work.


Hmm, ok then!


Unfortunately can’t help much with the other thing 😞


Thanks anyway 🙂