Files
neovim/runtime
Sean Dewar cc87dda31a fix(lsp): do not assume client capability exists in watchfiles check (#24550)
PR #23689 assumes `client.config.capabilities.workspace.didChangeWatchedFiles`
exists when checking `dynamicRegistration`, but thats's true only if it was
passed to `vim.lsp.start{_client}`.

This caused #23806 (still an issue in v0.9.1; needs manual backport), but #23681
fixed it by defaulting `config.capabilities` to `make_client_capabilities` if
not passed to `vim.lsp.start{_client}`.

However, the bug resurfaces on HEAD if you provide a non-nil `capabilities` to
`vim.lsp.start{_client}` with missing fields (e.g: not made via
`make_client_capabilities`).

From what I see, the spec says such missing fields should be interpreted as an
absence of the capability (including those indicated by missing sub-fields):
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#clientCapabilities

Also, suggest `vim.empty_dict()` for an empty dict in
`:h vim.lsp.start_client()` (`{[vim.type_idx]=vim.types.dictionary}`
no longer works anyway, probably since the cjson switch).
2023-08-04 08:10:54 +02:00
..
2023-04-23 15:22:55 +02:00
2022-12-08 16:33:38 +01:00
2023-06-11 12:40:22 +01:00
2021-09-13 16:33:41 +02:00
2021-05-01 22:29:03 -04:00
2022-08-20 10:04:55 +02:00
2021-04-27 09:21:32 -04:00
2023-05-15 09:38:32 +02:00
2023-04-13 12:15:30 +02:00
2023-04-07 13:26:29 +02:00
2022-10-17 08:19:48 +02:00