Closed fgheng closed 4 years ago
可能有语法规则重叠了,具体排查可以看一下 readme 的 troubleshooting 部分
This fixed an issue for me.
thank you, it helps.
require "nvim-treesitter.highlight"
-- use below replace local hlmap = vim.treesitter.TSHighlighter.hl_map
local hlmap = vim.treesitter.highlighter.hl_map
--Misc
hlmap.error = nil
hlmap["punctuation.delimiter"] = "Delimiter"
hlmap["punctuation.bracket"] = nil
It seems that after https://github.com/nvim-treesitter/nvim-treesitter/commit/1baf751fb0b03015c4c9883a87923cc4a7a4812e the above fix no longer works.
Now I'm using the following:
autocmd vimrc BufEnter * hi clear TSPunctBracket
@jackcogdill Dost “TS” in ”TSPunctBracket" here means TypeScript? Hoping for a PR if there is any generic (fits for all languages) solution.
No, TS
refers to treesitter.
I also tested this on a different machine, and it needed to use the old fix despite updating nvim-treesitter. Then after I updated Neovim from 0.7 -> 0.8 the new fix was necessary.
Perhaps we could make a PR if we can pin down the exact conditions where it's necessary (e.g. Neovim version >= X.Y.Z).
Describe the bug
你好,我最近尝试了插件nvim-treesitter,但是安装完这个插件之后发现rainbow没有了,不太清楚是什么原因,可以看一下么。