Hey I'm having a strange behavior with the current master: When I do a go to definition it works fine on the first time, but the subsequent ones to the same function doesn't work any more, this happens with all functions in my code, first time go to definition work subsequent ones doesn't. Logs:
WARN clojure-lsp.handlers: Finding definition file:///home/delboni/dev/nu/indigo/src/indigo/controllers/challenge.clj row 24 col 48 cursor indigo.logic.challenge/status
WARN clojure-lsp.main: DidCloseTextDocumentParams
WARN clojure-lsp.handlers: Finding definition file:///home/delboni/dev/nu/indigo/src/indigo/controllers/challenge.clj row 24 col 48 cursor indigo.logic.challenge/status
WARN clojure-lsp.handlers: Could not find definition for element under cursor, I think your cursor is: "logic.challenge/status" qualified as: indigo.logic.challenge/status
WARN clojure-lsp.handlers: Finding definition file:///home/delboni/dev/nu/indigo/src/indigo/controllers/challenge.clj row 24 col 48 cursor indigo.logic.challenge/status
WARN clojure-lsp.handlers: Could not find definition for element under cursor, I think your cursor is: "logic.challenge/status" qualified as: indigo.logic.challenge/status
if you are using lsp-mode/emacs, you probably didn't imported the project correctly
Oh, I think you use vim, right?
I'm using vim, what you mean with import the project?
at least for emacs, when you incorrectly import the project (not the project root, but some other file), the LSP functions work for the file, but when you change to another file, it stops working
In vim I just open the file, to set the root I have this settings on my lsp client provider:
"clojure-lsp": {
"command": "bash",
"args": ["-c", "clojure-lsp"],
"filetypes": ["clojure"],
"rootPatterns": ["project.clj", "deps.edn"],
"additionalSchemes": ["zipfile", "jar"],
"disableDiagnostics": false,
"trace.server": "on",
"initializationOptions": {}
}
it looks ok to me :thinking_face:
it's strange, that core clojure fn's I can use go to navigation, only my project fns that doesn't work, how can I debug this? It's even stating that my declarations are unused
I rolled back to release-20200805T150718 and is working fine again :thinking_face:
@snoe uses vim, maybe he can help understand why this is happening
@rafaeldelboni can you try latest again, but wipe out your .lsp/sqlite.1.db
file before launching
on large projects - that initial crawl can take a long time too, until that happens you'll see the behaviour with goto def
Hi I'm doing this every time and the problems still happens, I managed to trace where this started and was somewhere between release-20200828T065654 and release-20200910T181437
I still have everything working on release-20200828T065654, but when I upgrade to release-20200910T181437 this behavior starts to happen
after I do a lein bin
I always do:
rm -rf .clj-kondo/.cache rm -rf .lsp
on the project I'm working
Hum, it's calling a didCloseTextDocument incorrectly in your log... that's why that file lost the LSP features
I opened a issue if you need any more info let me know https://github.com/snoe/clojure-lsp/issues/184
when it first starts up, do you see both `starting clj-kondo project classpath scan (this takes awhile)` and `clj-kondo scanned project classpath in` ?
coc only states: Starting LS languageserver.clojure-lsp
I will paste the full initialization log here
after deleting the caches
In this log I have the full initialization and then I do a go to definition (that works), jump back to the previously file and tried to do the go to definition again.
But yes, It says this:
INFO clojure-lsp.crawler: starting clj-kondo project classpath scan (this takes awhile)
INFO clojure-lsp.crawler: clj-kondo scanned project classpath in 44184ms
DEBUG clojure-lsp.main: :initialize 95239 ()
WARN clojure-lsp.main: Initialized #object[org.eclipse.lsp4j.InitializedParams 0x1491a623 InitializedParams [