https://github.com/neovim/neovim/pull/19931 adds direct support for
highlighting capture groups (with fallback), obviating the need for
`vim.treesitter.highlighter.hl_map`. Instead of
`hl_map["@keyword"] = "TSKeyword"`
users can simply
`hi link TSKeyword @keyword`
Check for the existence of `hl_map` and either use the former or the
latter.
If the plugin is loaded after a colorscheme is set that defines any of
these highlight groups, the default won't be applied. Subsequent
"highlight clear" commands (common when switching colorschemes) will
then clear any of those highlights, but these defaults never have
another opportunity to be initialized.
Effectively, if you load neovim with a colorscheme that has definitions
for some of these highlight groups, then load treesitter, then switch
colorschemes, many of these default links will be absent resulting in
colors that do not appear the same as if that colorscheme had been
used at startup.
Hooking the ColorScheme event with an autocmd that just reapplies these
defaults gives every colorscheme switch the opportunity to get the
defaults for non-explicitly-defined groups.
* switch to split markdown parser with separate block and inline parsers to improve performance
* add exclude_children! directive (useful for something like Injected markdown incorrectly highlights indented docstrings #2212)
* split markdown queries into block and inline ones and add the injection for inline into block grammar
* add include_dir option to parser configs (needed because the two grammars don't live in the repos root directory)
BREAKING CHANGE: downstream queries need to be adapted to new parser
Add support for vlang filetypes.
- [ ] Highlight `C` as builtin variable. This is FFI in vlang land,
where C act like extern and access c functions. The vlang parser does
some extension between C function calls and arguments but I believe
highlighting C as builtin variable is sufficient indicator for now. I
tried to use offset! but failed. Any suggestions?
- [ ] Set up parser url. the vlang parser is located within [vls] repo. Is
installing from nested repo supported? `tree_sitter_v/src/parser.c`?
[vls]: https://github.com/vlang/vls/tree/master/tree_sitter_v
cc @elianiva @theHamsta