2

| separates atoms and dot makes vim unhappy about it so you could add additional braces syntax match FOO /\v(\.foo1>)|(\.foo2>)|(\.foo3>)/ or put a dot out of the branching: syntax match FOO /\v\.<(foo1|foo2|foo3)>/ hi link FOO Statement


2

This works like a charm to change colors The red flash: ERROR. The syntax is local to buffer (or even to window :h ownsyntax). But the colors are global. So syntax files should do "hi-def-link" at most. Other stuff belongs to colorschemes. the settings work also inside the document Going through the text the matches are tried with respect to the ...


2

Found the issue. This was because I didn't enable the highlight module where I called require('nvim-treesitter.configs').setup {} So after fixing, the above call should at least look like this: require('nvim-treesitter.configs').setup { highlight = { enabled = true } }


Only top voted, non community-wiki answers of a minimum length are eligible