-
-
Notifications
You must be signed in to change notification settings - Fork 831
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to disable highlighting of syntax errors? #119
Comments
Should be solved by #117 The corresponding highlight is require "nvim-treesitter.highlight"
local hlmap = vim.treesitter.TSHighlighter.hl_map
--Misc
hlmap.error = nil This table also contains the other highlights hlmap.error = nil
hlmap["punctuation.delimiter"] = "Delimiter"
hlmap["punctuation.bracket"] = nil
-- Constants
hlmap["constant"] = "Constant"
hlmap["constant.builtin"] = "Type"
hlmap["constant.macro"] = "Define"
hlmap["string"] = "String"
hlmap["string.regex"] = "String"
hlmap["string.escape"] = "SpecialChar"
hlmap["character"] = "Character"
hlmap["number"] = "Number"
hlmap["boolean"] = "Boolean"
hlmap["float"] = "Float"
-- Functions
hlmap["function"] = "Function"
hlmap["function.builtin"] = "Special"
hlmap["function.macro"] = "Macro"
hlmap["parameter"] = "Identifier"
hlmap["method"] = "Function"
hlmap["field"] = "Identifier"
hlmap["property"] = "Identifier"
hlmap["constructor"] = "Type"
-- Keywords
hlmap["conditional"] = "Conditional"
hlmap["repeat"] = "Repeat"
hlmap["label"] = "Label"
hlmap["operator"] = "Operator"
hlmap["keyword"] = "Repeat"
hlmap["exception"] = "Exception"
hlmap["include"] = "Include"
hlmap["type"] = "Type"
hlmap["type.builtin"] = "Type"
hlmap["structure"] = "Structure" |
To disable this hihglight, adding the following will be enough: highlight link TSError Normal |
Did you try it? I also thought this would work but somehow my plug config executes the plugin code after my init.vim so that your line has no effect. Edit: #121 solves this issue. |
It should have been solved by #121 |
I have tried it.It works well to disable the highlighting of syntax errors. Thanks for your work. |
Describe the bug
The treesitter highlighting is fast and awesome.But when syntax error occurs , the highlight groups will take effect, which is a hassle.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
**Output of
:checkhealth nvim_treesitter
***Output of
nvim --version
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: