helix-mods/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)
2023-06-30 00:25:23 +09:00
..
src LSP: Forcefully shutdown uninitialized servers (#7449) 2023-06-30 00:25:23 +09:00
Cargo.toml build(deps): bump tokio from 1.27.0 to 1.28.0 (#6935) 2023-05-02 10:17:59 +09:00