Calva: Go to / peek at definition not working

Created on 27 Feb 2019  路  9Comments  路  Source: BetterThanTomorrow/calva

Calva 1.3.63
Leiningen 2.8.3 on Java 1.8.0_202 Java HotSpot(TM) 64-Bit Server VM
VSCode 1.31.1

.lein\profile.clj
`
{:user
{
:plugins []
:repl {:plugins [[cider/cider-nrepl "0.19.0"]]
:dependencies [[nrepl "0.5.3"]]}
}
}

`

On windows 10.

The Go to/Peek at definition not working in my VS code.

Any guidelines or tricks to make it work ?

Thanks

Most helpful comment

I had a similar problem for a while, and i resolved by making a script called lein-cider in my path which looks like:

lein update-in :dependencies conj \[nrepl/nrepl\ \"0.6.0\"\ \:exclusions\ \[org.clojure/clojure\]\] \
  -- update-in :plugins conj \[cider/cider-nrepl\ \"0.21.1\"\] \
  -- update-in :plugins conj \[refactor-nrepl\ \"2.4.0\"\] \
  -- "$@"

... and starting the repl with lein-cider repl

(the :exclusions being the key part here - I think there was some transitive dependency causing issues for me)

All 9 comments

Project created by simply running 'lein new '

Hello,

How are you starting the repl?

I have the same issue. Started repl from project root folder.
Visual Studio 1.31.1 (1.31.1)

@PEZ by running "lein repl" in intergrated terminal

and i can evaluate the clj without error.

I can evaluate the expressions as well, but intellisense and goto definition not working.

I am totally sorry for the inconvenience! It does sound like the classic Calva dependency problem. People can evaluate, but not peek/goto.

That project file looks OK to me so I'm stompen on what is going on. Here's a lein command that works on my mac for injecting the needed dependencies (and then some, but I don't think that should hurt):

lein update-in :dependencies conj "[nrepl \"0.5.3\"]" -- update-in :dependencies conj "[cider/piggieback \"0.3.10\"]" -- update-in :plugins conj "[cider/cider-nrepl \"0.20.0\"]" -- update-in "[:repl-options :nrepl-middleware]" conj "[\"cider.nrepl/cider-middleware\"]" -- update-in "[:repl-options :nrepl-middleware]" conj "[\"cider.piggieback/wrap-cljs-repl\"]" -- repl :headless

I'm not sure if the quoting works on Windows, but maybe you can try it and see what happens?

I had a similar problem for a while, and i resolved by making a script called lein-cider in my path which looks like:

lein update-in :dependencies conj \[nrepl/nrepl\ \"0.6.0\"\ \:exclusions\ \[org.clojure/clojure\]\] \
  -- update-in :plugins conj \[cider/cider-nrepl\ \"0.21.1\"\] \
  -- update-in :plugins conj \[refactor-nrepl\ \"2.4.0\"\] \
  -- "$@"

... and starting the repl with lein-cider repl

(the :exclusions being the key part here - I think there was some transitive dependency causing issues for me)

That's awesome, @RicSwirrl. Thanks for sharing!

This should now be a non-issue again. :smile: Please reopen if it doesn't check out.

Was this page helpful?
0 / 5 - 0 ratings