Problem: treesitter parses each diff hunk in isolation, so incomplete syntax constructs at hunk boundaries (e.g., a function definition with no body) produce ERROR nodes and drop captures. Solution: read N lines from the on-disk file before/after each hunk and prepend/append them as unmapped padding lines. The line_map guard in highlight_treesitter skips extmarks for unmapped lines, so padding provides syntax context without visual output. Controlled by highlights.context (default 25, 0 to disable). Also applies to the vim syntax fallback path via a leading_offset filter. |
||
|---|---|---|
| .. | ||
| 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 | ||