mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06: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:
parent
935e1ca743
commit
8f31a730c0
@ -637,7 +637,7 @@ function protocol.make_client_capabilities()
|
|||||||
codeActionLiteralSupport = {
|
codeActionLiteralSupport = {
|
||||||
codeActionKind = {
|
codeActionKind = {
|
||||||
valueSet = (function()
|
valueSet = (function()
|
||||||
local res = vim.tbl_values(protocol.CodeActionKind)
|
local res = vim.tbl_values(constants.CodeActionKind)
|
||||||
table.sort(res)
|
table.sort(res)
|
||||||
return res
|
return res
|
||||||
end)(),
|
end)(),
|
||||||
|
Loading…
Reference in New Issue
Block a user