Description
How are you using the lua-language-server?
Kakoune
Which OS are you using?
Linux
What is the issue affecting?
Completion, Diagnostics/Syntax Checking, Hover
Expected Behaviour
The server handles the change to the variable name without crashing.
Actual Behaviour
The language server crashes and reboots from scratch. Since my projects have lots of libraries, it takes upwards of ten seconds for it to reboot.
Reproduction steps
Open the following file in Kakoune with lua-language-server configured (see here):
local mystring = "foo"
print(string.match(mystring, "(foo)"))
- Change
string
on line 3 tomath
. - Observe that the diagnostics correctly update to show that
math.match
doesn't exist. - Change
math
back tostring
. - Observe that the language server crashes and reboots, and the diagnostics in kak-lsp get desynced.
This is 100% reproducible with default configuration. The diagnostics getting out of sync is likely a byproduct of the crash, and is not the primary issue, but it makes it very obvious when the crash occurs.
Additional Notes
I tested this exact same setup in vscode, and it does not crash. This makes me unsure if the root of the issue is in lua-language-server, or in kak-lsp. However, I have absolutely no issues with any other language server in kak-lsp, so I'm leaning towards the server being at fault. Oddly, the server is not showing any sort of stack trace - it is just exiting without any useful information.
One thing I noticed is that kak-lsp does not support workspace/diagnostic/refresh
. I am unsure if that is related to this problem.
Log File
Here are the logs both for lua-language-server, and for kak-lsp. The kak-lsp log shows every RPC request and response, as well as every method that is passed to or from the editor itself.
sumneko-crash.log
sumneko-crash-kak.log