chore: adapt to resolved_capabilities deprecation (#1902)
Neovim deprecated `resolved_capabilities` in https://github.com/neovim/neovim/pull/17814 Replace with `server_capabilities` and adapted feature table, which is backwards compatible with 0.7.
This commit is contained in:
@@ -236,7 +236,7 @@ local function check_capabilities(feature, bufnr)
|
|||||||
|
|
||||||
local supported_client = false
|
local supported_client = false
|
||||||
for _, client in pairs(clients) do
|
for _, client in pairs(clients) do
|
||||||
supported_client = client.resolved_capabilities[feature]
|
supported_client = client.server_capabilities[feature]
|
||||||
if supported_client then
|
if supported_client then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
@@ -261,12 +261,12 @@ local function check_capabilities(feature, bufnr)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local feature_map = {
|
local feature_map = {
|
||||||
["document_symbols"] = "document_symbol",
|
["document_symbols"] = "documentSymbolProvider",
|
||||||
["references"] = "find_references",
|
["references"] = "referencesProvider",
|
||||||
["definitions"] = "goto_definition",
|
["definitions"] = "definitionProvider",
|
||||||
["type_definitions"] = "type_definition",
|
["type_definitions"] = "typeDefinitionProvider",
|
||||||
["implementations"] = "implementation",
|
["implementations"] = "implementationProvider",
|
||||||
["workspace_symbols"] = "workspace_symbol",
|
["workspace_symbols"] = "workspaceSymbolProvider",
|
||||||
}
|
}
|
||||||
|
|
||||||
local function apply_checks(mod)
|
local function apply_checks(mod)
|
||||||
|
|||||||
Reference in New Issue
Block a user