-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LSP not responding when editor quits and sends shutdown request #20700
Comments
The shutdown handler we have just tries to acquire the global mutex it has (ensuring in-flight operations finish) and then responds with @cngarrison Does this happen with a bare minimum reproduction? E.g. open an empty ts file in a fresh directory, plus whichever method you're using to enable the Deno LSP, and try to exit. |
@nayeemrmn Thanks for that feedback. I launched BBEdit with I launched BBEdit, opened a new project directory (file browser), created an (empty) index.ts file, then quit BBEdit. The hang returned. The team at BareBones is very good, and I have flagged this issue with them. Please advise if there is any further testing I can help with. |
For background (and in case it helps focus the investigation): When stopping a language server (at application quit or for certain configuration changes), BBEdit sends a After receiving a response to Then, BBEdit waits for the server process to exit. This is done because some language servers actually do nothing at In the case of If Hope this helps. :-) |
Its never been a problem on nvim/helix, so I don't have other informations regarding this. |
@siegel Is there a chance BBEdit isn't closing the LSP process's stdin? |
Probably. :-) BBEdit does not explicitly close the pipes until after the server process has exited as requested. Is there something in the LSP specification that states that the client is expected to close |
Nope. Based on the wording at https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#exit we should exit without needing that. But given that this issue occurs specifically between Deno and BBEdit, maybe both actions should be taken @ebkalderon Could |
@nayeemrmn Certainly, this could (and should) definitely be changed. In theory, |
Done! Your #399 is it. And I appreciate you taking an interest in looking into it. :-) |
I'm experiencing the same issue in Nova with the built-in LanguageClient. Manually restarting the LSP client often causes the server to hang, and after a time a stream of |
When quitting my EDITOR (BBEdit), it hangs waiting for
deno lsp
.I have reported the issue to BareBones. They advised that it's possibly due to LSP server not responding correctly to the application's request to shut itself down.
Does
deno lsp
respond to theshutdown
request?Is there a config setting for handling the
shutdown
request?The text was updated successfully, but these errors were encountered: