handle semantic_tokens on lsp_attach based on chadrc option (#1907)

This commit is contained in:
siduck 2023-04-10 07:21:07 +05:30
parent f873d3cc50
commit af123eee4d

View File

@ -15,6 +15,10 @@ M.on_attach = function(client, bufnr)
if client.server_capabilities.signatureHelpProvider then
require("nvchad_ui.signature").setup(client)
end
if not utils.load_config().ui.lsp_semantic_tokens then
client.server_capabilities.semanticTokensProvider = nil
end
end
M.capabilities = vim.lsp.protocol.make_client_capabilities()