From ddd92a70d2aab5247895e89abaaa79c62ba7dbb4 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 28 May 2023 07:51:28 +0200 Subject: feat(lsp): initial support for dynamic capabilities (#23681) - `client.dynamic_capabilities` is an object that tracks client register/unregister - `client.supports_method` will additionally check if a dynamic capability supports the method, taking document filters into account. But only if the client enabled `dynamicRegistration` for the capability - updated the default client capabilities to include dynamicRegistration for: - formatting - rangeFormatting - hover - codeAction - hover - rename --- runtime/doc/news.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime/doc') diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 795ccc55de..b6839ec692 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -36,6 +36,7 @@ ADDED FEATURES *news-added* The following new APIs or features were added. +• Dynamic registration of LSP capabilities. An implication of this change is that checking a client's `server_capabilities` is no longer a sufficient indicator to see if a server supports a feature. Instead use `client.supports_method()`. It considers both the dynamic capabilities and static `server_capabilities`. • |vim.iter()| provides a generic iterator interface for tables and Lua iterators |luaref-in|. -- cgit