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