mirror of https://github.com/helix-editor/helix
LSP: Discard publishDiagnostic from uninitialized servers (#7467)
The spec explicitly disallows publishDiagnostic to be sent before the initialize response: > ... the server is not allowed to send any requests or notifications to > the client until it has responded with an InitializeResult ... (https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#initialize) But if a non-compliant server sends this we currently panic because we '.expect()' the server capabilities to be known to fetch the position encoding. Instead of panicking we can discard the notification and log the non-compliant behavior.pull/7480/head
parent
4a2337d828
commit
d3f8e0592b
Loading…
Reference in New Issue