From c618b314c6a266806edf692122b16ba9ff7a8e10 Mon Sep 17 00:00:00 2001 From: Michael Lingelbach Date: Sat, 30 Apr 2022 02:22:30 -0700 Subject: chore(lsp): remove capabilities sanitization (#17814) * feat(lsp)!: remove capabilities sanitization Users must now access client.server_capabilities which matches the same structure as the protocol. https://microsoft.github.io/language-server-protocol/specification client.resolved_capabilities is no longer used to gate capabilities, and will be removed in a future release. BREAKING CHANGE Co-authored-by: Mathias Fussenegger --- runtime/lua/vim/lsp/handlers.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/lua/vim/lsp/handlers.lua') diff --git a/runtime/lua/vim/lsp/handlers.lua b/runtime/lua/vim/lsp/handlers.lua index 978e44b6f8..dbe985700e 100644 --- a/runtime/lua/vim/lsp/handlers.lua +++ b/runtime/lua/vim/lsp/handlers.lua @@ -379,7 +379,7 @@ function M.signature_help(_, result, ctx, config) return end local client = vim.lsp.get_client_by_id(ctx.client_id) - local triggers = client.resolved_capabilities.signature_help_trigger_characters + local triggers = vim.tbl_get(client.server_capabilities, "signatureHelpProvider", "triggerCharacters") local ft = api.nvim_buf_get_option(ctx.bufnr, 'filetype') local lines, hl = util.convert_signature_help_to_markdown_lines(result, ft, triggers) lines = util.trim_empty_lines(lines) -- cgit