Fork me on GitHub
#calva
<
2023-06-05
>
dabrazhe07:06:52

When re-starting the VSC and starting the babashka repl I am getting these messages

[Error - 21:00:50] Connection to server got closed. Server will not be restarted.
[Error - 21:00:50] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 21:00:50] Clojure Language Client client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 

pez07:06:55

Looks like clojure-lsp has troubles starting. Check if you can run it from the terminal. The binary is located in the Calva extension folder, which you can find using the VS Code command Extensions: Open Extensions Folder. Mine is here:

~/.vscode-insiders/extensions/betterthantomorrow.calva-2.0.369
❯ ls -lh clojure-lsp
-rwxrwxr-x  1 pez  staff   106M Jun  3 11:40 clojure-lsp
Check if you can run it to report the version, for instance:
~/.vscode-insiders/extensions/betterthantomorrow.calva-2.0.369
❯ ./clojure-lsp --version
clojure-lsp 2023.05.04-19.52.47-nightly
clj-kondo 2023.04.15-SNAPSHOT

Cal Herries09:06:47

The “View: Show references” and “Calls: Show Call Hierarchy” commands aren’t working reliably anymore for me. They often show no results. Go to definition still works fine though. How can I diagnose the problem?

pez11:06:29

Can you confirm that clojure-lsp is running? Both those commands are provided by clojure-lsp, while Go to definition is primarily handled by the REPL.

Cal Herries12:06:01

Yes, a tooltip says “Clojure-lsp is active” at the bottom of the editor.

pez13:06:09

From the tooltip icon can enable trace level settings for clojure-lsp. That will print a log in the Output channel Clojure Language Client. Maybe it can reveal something about what is (not) going on.

pez13:06:16

In #CPABC1H61 there might be more people who knows how to track down problems like this, btw.