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
1 changed files with 4 additions and 0 deletions

View File

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