From af123eee4d4f4ecd8ff935ad465e589673b81619 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 10 Apr 2023 07:21:07 +0530 Subject: [PATCH] handle semantic_tokens on lsp_attach based on chadrc option (#1907) --- lua/plugins/configs/lspconfig.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 24083ae..fbce3a8 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -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()