mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
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
This commit is contained in:
@@ -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)(),
|
||||
|
||||
Reference in New Issue
Block a user