Problem: `highlights.context.enabled` and `highlights.context.lines` were defined, validated, and range-checked but never read during highlighting. Hunks inside incomplete constructs (e.g., a table literal or function body whose opening is beyond the hunk's own context lines) parsed incorrectly. Solution: `compute_hunk_context` reads the working tree file using the hunk's `@@ +start,count @@` line numbers to collect surrounding code. Files are read once and cached across hunks. `highlight_treesitter` accepts an optional context parameter that prepends/appends context lines to the parse string, offsetting capture rows so extmarks only land on hunk lines. |
||
|---|---|---|
| .. | ||
| commands.lua | ||
| conflict.lua | ||
| debug.lua | ||
| diff.lua | ||
| fugitive.lua | ||
| git.lua | ||
| health.lua | ||
| highlight.lua | ||
| init.lua | ||
| lib.lua | ||
| log.lua | ||
| merge.lua | ||
| parser.lua | ||