fix: disable Nvim v0.9.0 lsp semantic highlights

This commit is contained in:
Daniel Hill 2023-04-07 10:35:44 -04:00
parent 1bbbb0fa4e
commit 1f14c5a0d1
1 changed files with 14 additions and 0 deletions

View File

@ -28,6 +28,20 @@ local function create_autocmds()
vim.cmd.setlocal("winhighlight=Normal:NormalSB,SignColumn:SignColumnSB")
end,
})
-- This is a mitigation for new Nvim v0.9.0 lsp semantic highlights
-- overriding treesitter highlights. Need to link these to relevant
-- treesitter groups in the future. See :h lsp-semantic-highlight
vim.api.nvim_create_autocmd("ColorScheme", {
group = gruber_darker_group,
pattern = "*",
callback = function()
-- Hide all semantic highlights
for _, group in ipairs(vim.fn.getcompletion("@lsp", "highlight")) do
vim.api.nvim_set_hl(0, group, {})
end
end
})
end
---Clear current highlights and set Neovim global `colors_name`