Nim Lsp Not responding #7508
-
SummaryWhen using any lsp feature such as goto definition after a few seconds I get the error Async job failed: request 1 timed out I assume reading the log that this is the cause: The language server itself works fine when using it with neovim lsp plugin with default settings Reproduction Stepsnimlangserver installed with nimble (its version 0.1.0) Helix log
Platformlinux -- kenel 6.3.8_1 Terminal EmulatorSt (also tested on xfce4-terminal) Helix Version23.05 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I can't reproduce this out of the box on the latest master of Helix and nimlangserver. What version are you running of nimlangserver? Also, what does the log show when running in verbose mode? You can use |
Beta Was this translation helpful? Give feedback.
Ah ok, I can reproduce. The problem is this line upstream https://github.com/nim-lang/langserver/blob/b243a4c076bde0876052dff7d7a65ab43d2bd33b/nimlangserver.nim#L122
The server isn't handling the case that
rootUri
can benull
(relevant part of the spec: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#initialize). When we pass it as null it fails saying thatfile
is the only scheme supported by the scheme on a null URI is also null. This should be fixed upstream but as a workaround you can create a.helix/languages.toml
file in your Nim project root directory so that we send the rootUri as that directory rather than null.