diffs.nvim/lua/diffs
Barrett Ruth 2e1ebdee03 feat(highlight): add treesitter context padding from disk
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.
2026-02-07 13:05:53 -05:00
..
commands.lua fix(commands): handle :e on diffs:// buffers via BufReadCmd 2026-02-06 22:21:33 -05:00
debug.lua fix(debug): resolve sparse array crash in json dump 2026-02-07 00:50:02 -05:00
diff.lua fix(diff): strip linematch from char-level diff 2026-02-07 00:50:08 -05:00
fugitive.lua feat(fugitive): line position tracking for keymaps 2026-02-05 00:27:35 -05:00
git.lua feat(git): add index and working tree content retrieval 2026-02-04 22:23:09 -05:00
health.lua feat(highlight): add character-level intra-line diff highlighting 2026-02-06 13:53:58 -05:00
highlight.lua feat(highlight): add treesitter context padding from disk 2026-02-07 13:05:53 -05:00
init.lua feat(highlight): add treesitter context padding from disk 2026-02-07 13:05:53 -05:00
lib.lua feat(highlight): add character-level intra-line diff highlighting 2026-02-06 13:53:58 -05:00
log.lua feat: add :Gdiff, :Gvdiff, :Ghdiff commands for unified diff view 2026-02-04 19:52:17 -05:00
parser.lua feat(highlight): add treesitter context padding from disk 2026-02-07 13:05:53 -05:00