Sometimes, our XText-based LSP server gets confused; this can happen for example when someone is refactoring a lot of
files at once, resulting in lots of errors. While one can sometimes recover by closing all tabs and opening files one at a time,
this process can be tedious for novices. We would like to add a command to restart our LSP server, similar to what our NASA colleagues have done for the PVS VSCode extension, see: https://github.com/nasa/vscode-pvs/blob/master/vscode-pvs/docs/FAQ.md#q7-vscode-pvs-is-not-responding-and-reports-pvs-errors-what-can-i-do
Would it make sense to allow somehow doing something like shown above?
Is there perhaps a different way to achieve the desired effect?
For example, could we somehow force the extension to deactivate itself and re-activate itself?
We have used this project to build a vscode extension for our language, see: https://github.com/opencaesar/oml-luxor
Sometimes, our XText-based LSP server gets confused; this can happen for example when someone is refactoring a lot of files at once, resulting in lots of errors. While one can sometimes recover by closing all tabs and opening files one at a time, this process can be tedious for novices. We would like to add a command to restart our LSP server, similar to what our NASA colleagues have done for the PVS VSCode extension, see: https://github.com/nasa/vscode-pvs/blob/master/vscode-pvs/docs/FAQ.md#q7-vscode-pvs-is-not-responding-and-reports-pvs-errors-what-can-i-do
There's been a related discussion in the Theia community about this: https://spectrum.chat/theia/dev/whats-a-graceful-way-to-restart-a-language-server~063cd65d-9dfb-498f-ba9b-8ef8a19140db
One suggestion involves calling
LanguageClient.stop()
andLanguageClient.start()
. WithSprottyLspVscodeExtension
, it is currently not possible:Since
languageClient
is read-only, we cannot do something like this:Would it make sense to allow somehow doing something like shown above?
Is there perhaps a different way to achieve the desired effect? For example, could we somehow force the extension to deactivate itself and re-activate itself?