Unable to start LSP server: ... attempt to index a nil value (local 'result') #379
Replies: 8 comments 1 reply
-
The language server probably did not like the initialize request and
either exited or returned null. Try enabling `lsp.log_rpc` before
starting a language server and then inspect Tools > Language Server >
Show Log after you see the error.
I know that gopls (Go) doesn't like the "selectionRange = {}" in the
initialize request, so I have to comment it out locally until I find a
better way to handle it.
|
Beta Was this translation helpful? Give feedback.
-
Sorry, I do have
|
Beta Was this translation helpful? Give feedback.
-
Looks like the problems with
When I run either |
Beta Was this translation helpful? Give feedback.
-
It looks like the "haskell-language-server" is just not starting up.
Textadept spawns a the process, sends it the LSP initialize request over
stdin, and then reads a response. However, since the language server is
not responding, `line` is nil (usually this means EOF). Can you enable
logging for the haskell server to see if it doesn't like something about
Textadept's initialize request?
lua-lsp starts up okay, but it seems to be throwing an internal error,
probably because Textadept is not giving it a root URI (there is no
project associated with the open Lua file).
|
Beta Was this translation helpful? Give feedback.
-
Here's with logging (
|
Beta Was this translation helpful? Give feedback.
-
Okay, sounds like my gopls issue. Try commenting this line out:
https://github.com/orbitalquark/textadept-lsp/blob/9346e0acc93b5bf4a33e92276630a94ee7a8ce0d/init.lua#L386
|
Beta Was this translation helpful? Give feedback.
-
I commented out that line, and now I'm getting this:
|
Beta Was this translation helpful? Give feedback.
-
Ah, despite that error message it is working now! |
Beta Was this translation helpful? Give feedback.
-
I am running the latest version of both textadept and textadept-lsp fresh from the repos as of today. When I go to any buffer with a supported language (e.g. Lua or Haskell), I get the following error message:
Any suggestions?
Beta Was this translation helpful? Give feedback.
All reactions