Fork me on GitHub
#lsp
<
2022-10-09
>
Dumch10:10:15

There is (only) one project where I don’t have hover and can’t go to definition for core functions. I tried to debug it, and wasn’t able to find out any problems. • I tried latest and 30 Jun 2022 versions — same result; • The only warning I see is this one: [WARN][2022-10-09 13:26:51] ...lsp/handlers.lua:110 "The language server clojure_lsp triggers a registerCapability handler despite dynamicRegistration set to false. Report upstream, this warning is harmless" • no errors in clojure-lsp.out What could I do next? My editor is nvim

Dumch11:10:32

I found a hack to fix it — replace project.clj with the almost empty default one, restart the project, get back to previous version and after that it works even after relaunching.

ericdallo12:10:06

Could you restart LSP and paste the server log here please?

Dumch12:10:34

To reproduce it I remove cache and reopened the project. I also removed all the lsp cache and logs I had before.

ericdallo12:10:41

Oh that's weird, the classpath found is just a random cache jar from deps.edn

ericdallo12:10:59

Could you try to remove .cpcache and try again?

ericdallo12:10:14

I thought you say it was a lein project, is there any deps.edn file as well?

Dumch12:10:51

thats a lein project

ericdallo12:10:33

Could you try removing that .cpcache file and restarting it?

Dumch12:10:10

I removed it and restarted — no hover. Than I remove .lsp and restarted. Same

ericdallo12:10:53

Could you check if lein classpath returns the correct classpath?

Dumch12:10:00

/Users/m1/IdeaProjects/work/server/.cpcache/80DE641352724268780836348C56B4A1.jar

Dumch12:10:16

I have also found this in the project [lein-classpath-jar "0.1.0"]] ;; to work around long-classpath issues on Windows

Dumch12:10:26

seems like it is the problem

Dumch13:10:30

Yes, removing this and clearing the .lsp cache works, thank you!

ericdallo13:10:28

I don't think we support that one more weird lein plugin 😅

😳 1
otfrom16:10:08

When I complete a clojure-lsp snippet I get the following (using defn as an example

(defn ${1:name} [$2]
  $0)
Should it be prompting me for the $1 and $2 and then putting the cursor where $0 is? I just get the text as above and I'm a bit confused about how they should look.

ericdallo17:10:28

You should install yasnippet emacs package

otfrom09:10:36

I was missing (yas-global-mode 1) after my (require 'yasnippet)

👍 1