langserver crashes if rootUri is not set
sigmaSd opened this issue · 2 comments
sigmaSd commented
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#initialize
The spec allows rootUri to be null, seems like langserver doesn't handle this
Opening a nim file outside of a nim project will make it crash
(Another issue is that crashes don't kill spawned nimsuggest server, so they remain alive)
sainttttt commented
I think I'm having a similar problem where it crashes when I try and open up a regular nim file: I get this error in my logs
[ERROR][2023-08-07 17:08:33] .../vim/lsp/rpc.lua:675 "rpc" "/Users/saint/.nimble/bin/nimlangserver" "stderr" 'Shutting down due to an error: Invalid scheme: , only "file" is supported\nutils.nim(87) uriToPath\nasyncfutures.nim(389) read\nasyncfutures.nim(389) read\nasyncfutures.nim(389) read\n??? routeIter\nasyncfutures.nim(389) read\nasyncfutures.nim(389) read\n\n'
Also thanks for mentioning that crashes don't kill the spawned nimsuggest server, I was having loads of them on my system because of this!
blanky0230 commented
Same issue for me as @sainttttt I'm still digging though.