Open Lambeaux opened 2 years ago
Hello. It is a bit of a mystery to me how Leiningen treats:
Maybe this is a situation where providing the configuration via the command line works in one way, and providing them in the user profile works in some other way.
I would try some different things:
Probably the first option there will work, because that is what Calva jack-in uses and you have confirmed it works. But if you want to be able to start it using only lein repl
, then the other experiments might shed some light.
I have as similar mystery with providing shadow-cljs middleware via the command line. Although in that mystery it is the other way around: providing the middleware configuration via the command line does not work. Providing it in the project works: https://codeberg.org/leiningen/leiningen/issues/10
Appreciate your response. I'll try that. I'll report back with findings.
Gosh, I might have gone too deep down the rabbit hole this time...
I reviewed some similar issues found here: https://github.com/BetterThanTomorrow/calva/issues?q=is%3Aissue+is%3Aopen+go+to+definition - there are similarities but none of them really get at the heart of what I'm looking for. I also reviewed the docs, such as:
I'm working on a Leiningen project that leverages legacy figwheel and figwheel-sidecar. Clojure LSP and go-to-definition work wonderfully ... until I start the REPL. Once I do that, I can no longer click symbols to jump around the codebase and into dependencies. Some info:
project.clj
.lein repl
andnode
myself and connecting to them remotely usingConnect to a running REPL server in the project
command, and picking theLeiningen + Legacy Figwheel
option.Important note: If I use Calva's "jack-in" feature with Leiningen + Legacy Figwheel, the problem goes away. I have a useable REPL and Clojure LSP seems to be working normally. But if I try to reproduce the parameters for jacking in ...
... manually within my
~/.lein/profiles.clj
...... and try to run the REPL myself, I get an error:
This seems to be incompatible middleware, as noted here: https://nrepl.org/nrepl/troubleshooting.html#warnings-when-starting-nrepl - as expected, we've got a dependency pulling in something problematic:
How does Calva make this work for jacking-in? I've tried messing with the versions of the various dependencies in my
profiles.clj
but I can't find a dependency version combo that works.Here is a sample, partially redacted project.clj that closely mirrors the one I'm using for my project.