fix(lsp): backwards compatible client.supports_method (#3339)
This commit is contained in:
@@ -22,8 +22,14 @@ end
|
|||||||
|
|
||||||
-- disable semanticTokens
|
-- disable semanticTokens
|
||||||
M.on_init = function(client, _)
|
M.on_init = function(client, _)
|
||||||
if client.supports_method "textDocument/semanticTokens" then
|
if vim.fn.has "nvim-0.11" ~= 1 then
|
||||||
client.server_capabilities.semanticTokensProvider = nil
|
if client.supports_method "textDocument/semanticTokens" then
|
||||||
|
client.server_capabilities.semanticTokensProvider = nil
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if client:supports_method "textDocument/semanticTokens" then
|
||||||
|
client.server_capabilities.semanticTokensProvider = nil
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user