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_spec.lua | ||
| diff_spec.lua | ||
| fugitive_spec.lua | ||
| git_spec.lua | ||
| helpers.lua | ||
| highlight_spec.lua | ||
| init_spec.lua | ||
| minimal_init.lua | ||
| parser_spec.lua | ||
| read_buffer_spec.lua | ||