diff options
author | Michael Davis | 2022-11-22 02:52:23 +0000 |
---|---|---|
committer | GitHub | 2022-11-22 02:52:23 +0000 |
commit | 9059c65a5385f6d3cc0bc7f6e3f835ae542635a5 (patch) | |
tree | 6fffacee213769a669c045f1c5c2a07bdf41ec02 /contrib | |
parent | 1db01caec7c91e270a23fd4f85955bb235ffbcb7 (diff) |
lsp: Check server provider capabilities (#3554)
Language Servers may signal that they do not support a method in
the initialization result (server capabilities). We can check these
when making LSP requests and hint in the status line when a method
is not supported by the server. This can also prevent crashes in
servers which assume that clients do not send requests for methods
which are disabled in the server capabilities.
There is an existing pattern the LSP client module where a method
returns `Option<impl Future<Output = Result<_>>>` with `None` signaling
no support in the server. This change extends this pattern to the rest
of the client functions. And we log an error to the statusline for
manually triggered LSP calls which return `None`.
Diffstat (limited to 'contrib')
0 files changed, 0 insertions, 0 deletions