aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/protocol.lua
diff options
context:
space:
mode:
authorDavid Hotham <david.hotham@blueyonder.co.uk>2022-10-16 23:24:39 +0100
committerGitHub <noreply@github.com>2022-10-16 15:24:39 -0700
commit8f31a730c0dd76180648ba3b7c94aa5d059432e5 (patch)
treed27f9806105583dae335a35a65a216a29c5f7eb1 /runtime/lua/vim/lsp/protocol.lua
parent935e1ca743abb4fce1effef063e5645f3df88119 (diff)
downloadrneovim-8f31a730c0dd76180648ba3b7c94aa5d059432e5.tar.gz
rneovim-8f31a730c0dd76180648ba3b7c94aa5d059432e5.tar.bz2
rneovim-8f31a730c0dd76180648ba3b7c94aa5d059432e5.zip
fix(lsp): reporting bogus capabilities in CodeActionKind #20678
Problem: LSP client provides bogus capabilities in CodeActionKind. LSP logs show this in the "initialize" message: codeActionKind = { valueSet = { "Empty", "QuickFix", "Refactor", "RefactorExtract", "RefactorInline", "RefactorRewrite", "Source", "SourceOrganizeImports", "", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports" } Solution: Only the values from the CodeActionKind table should be presented, not also the keys. fix #20657
Diffstat (limited to 'runtime/lua/vim/lsp/protocol.lua')
-rw-r--r--runtime/lua/vim/lsp/protocol.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp/protocol.lua b/runtime/lua/vim/lsp/protocol.lua
index 4034753322..7442c8f005 100644
--- a/runtime/lua/vim/lsp/protocol.lua
+++ b/runtime/lua/vim/lsp/protocol.lua
@@ -637,7 +637,7 @@ function protocol.make_client_capabilities()
codeActionLiteralSupport = {
codeActionKind = {
valueSet = (function()
- local res = vim.tbl_values(protocol.CodeActionKind)
+ local res = vim.tbl_values(constants.CodeActionKind)
table.sort(res)
return res
end)(),