|
|
@@ -19,7 +19,13 @@ return {
|
|
|
-- Configuration on attach
|
|
|
vim.api.nvim_create_autocmd("LspAttach", {
|
|
|
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
|
|
|
- callback = function(_)
|
|
|
+ callback = function(args)
|
|
|
+ if vim.treesitter ~= nil and type(vim.treesitter.highlighter.active[args.buf]) ~= "nil" then
|
|
|
+ local client = vim.lsp.get_client_by_id(args.data
|
|
|
+ .client_id)
|
|
|
+ client.server_capabilities.semanticTokensProvider = nil
|
|
|
+ end
|
|
|
+
|
|
|
vim.keymap.set("n", "SR", vim.lsp.buf.rename)
|
|
|
vim.keymap.set("n", "Sx", vim.lsp.buf.code_action)
|
|
|
vim.keymap.set("n", "SI", function()
|