neovim/test/functional/plugin
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
..
lsp feat(lsp): implement textDocument/diagnostic (#24128) 2023-07-20 09:03:48 +02:00
ccomplete_spec.lua dist: generated version of ccomplete.vim (#21623) 2023-01-05 11:00:32 -05:00
cfilter_spec.lua dist: transpile cfilter.vim => cfilter.lua #21662 2023-01-08 12:31:38 -08:00
editorconfig_spec.lua fix(editorconfig): check that buffer is valid (#23922) 2023-06-05 11:53:13 -05:00
health_spec.lua feat(health): fold successful healthchecks #22866 2023-06-06 08:42:26 -07:00
lsp_spec.lua fix(lsp): do not assume client capability exists in watchfiles check (#24550) 2023-08-04 08:10:54 +02:00
man_spec.lua test: add more tests for :Man section extraction 2023-05-08 15:46:21 +08:00
matchparen_spec.lua chore: fix typos (#17755) 2022-03-25 19:57:59 +01:00
msgpack_spec.lua test: Eliminate plugin/helpers.lua 2019-08-05 23:55:57 +02:00
shada_spec.lua test: don't unnecessarily specify win/buf for nvim_(get|set)_option_value 2023-05-22 13:02:07 +06:00