Problem: the header context string (e.g. "function M.setup()") was parsed in isolation by treesitter, which couldn't recognize "function" as @keyword.function because the snippet is an incomplete definition with no body or "end". Solution: append the already-built new_code lines as trailing context when parsing the header string, giving treesitter a complete function definition. Filter captures to row 0 only so body-line captures don't produce extmarks on the header line. |
||
|---|---|---|
| .. | ||
| commands.lua | ||
| debug.lua | ||
| diff.lua | ||
| fugitive.lua | ||
| git.lua | ||
| health.lua | ||
| highlight.lua | ||
| init.lua | ||
| lib.lua | ||
| log.lua | ||
| parser.lua | ||