Problem: highlight_treesitter only iterated captures from the base language tree (trees[1]:root()). When code contained injected languages (e.g. VimL inside vim.cmd()), those captures were never read, so injected code got no syntax highlighting in diffs. Solution: pass true to parse() to trigger injection discovery, then use parser_obj:for_each_tree() to iterate all trees including injected ones. Each tree gets its own highlights query looked up by ltree:lang(), and @spell/@nospell captures are filtered out. |
||
|---|---|---|
| .. | ||
| commands.lua | ||
| debug.lua | ||
| diff.lua | ||
| fugitive.lua | ||
| git.lua | ||
| health.lua | ||
| highlight.lua | ||
| init.lua | ||
| lib.lua | ||
| log.lua | ||
| parser.lua | ||