Open p-himik opened 3 years ago
This could be that it is nREPL that is providing the location. So if you haven't reloaded the files, I guess it could be using outdated knowledge about them.
Leaving this open, because I want to understand what is happening and figure if we can make it better somehow. If my guess about nREPL is right there, maybe we can prioritize clojure-lsp's answer (we ask both today, and maybe we are picking nREPL first, I need to check).
Oh, interesting! At the moment, is there a way to select just clojure-lsp at the user level, without changing Calva code?
There isn't. Likely won't be, either. 😄 If yo encounter this again, see if reloading the file helps, please. I will too. Think I've seen this a few times, but didn't bother to investigate then.
I have a file that I just refactored into two smaller files. After that, jumping to a symbol sends me to a wrong location. E.g. I have a function
get-random-angles
that's defined on line 187 after the refactoring. When I click on it, the "Clojure Language Client" has this section in its output, among other things:So seems like Clojure-lsp is correct. But Calva sends me to line 230 instead. I suspect that's the location of the function before the refactoring. Similar thing happens with other symbols. Navigating to symbols that are defined in unchanged files works just fine.
Restarting VSCode fixed the issue and I couldn't reproduce it anymore - neither in the same project nor in a new one. Perhaps there's some cache in Calva that sometimes isn't getting cleared.