fix(treesitter): disable semantic highlighting for lua comment

This commit is contained in:
2025-04-16 22:15:19 +02:00
parent eff349ffb1
commit 0c327701a1
+4
View File
@@ -34,6 +34,10 @@ return {
vim.opt.foldmethod = "expr" vim.opt.foldmethod = "expr"
vim.opt.foldexpr = "nvim_treesitter#foldexpr()" vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
-- Disable LSP semantic highlighting for lua comments because it will
-- otherwise override highlights from `comment`.
vim.api.nvim_set_hl(0, "@lsp.type.comment.lua", {})
-- To set the priority of semantic highlighting lower than treesitter (100), -- To set the priority of semantic highlighting lower than treesitter (100),
-- uncomment the line below: -- uncomment the line below:
-- vim.hl.priorities.semantic_tokens = 99 -- vim.hl.priorities.semantic_tokens = 99