You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
helix/helix-lsp
Michael Davis e0bb032f0e
LSP: Forcefully shutdown uninitialized servers (#7449)
The LSP spec has this to say about initialize:

> Until the server has responded to the `initialize` request with an
> `InitializeResult`, the client must not send any additional requests
> or notifications to the server.

(https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#initialize)

The spec is not really explicit about how to handle this scenario.
Before a client sends the 'initialize' request we are allowed to send an
'exit' notification, but after 'initialize' we can't send any requests
(like shutdown) or notifications (like exit). So my intepretation is
that we should forcefully close the server in this state.

This matches the behavior of Neovim's built-in LSP client:
5ceb2238d3/runtime/lua/vim/lsp.lua (L1610-L1628)
1 year ago
..
src LSP: Forcefully shutdown uninitialized servers (#7449) 1 year ago
Cargo.toml build(deps): bump tokio from 1.27.0 to 1.28.0 (#6935) 1 year ago