diffs.nvim/lua/diffs
Barrett Ruth d7ee488ef3
refactor(highlight): unified per-line extmark builder in highlight_hunk
Problem: highlight_hunk applied DiffsClear extmarks across 5 scattered
sites with ad-hoc column arithmetic. highlight_hunk_vim_syntax duplicated
the inline vim syntax path, and the deferred pass in init.lua double-called
it, creating duplicate scratch buffers and extmarks.

Solution: reorganize highlight_hunk into two clean phases:
- Phase 1: multi-line syntax computation (treesitter, vim syntax, diff
  grammar, header context text) — sets syntax extmarks only
- Phase 2: per-line chrome (DiffsClear, backgrounds, gutter, overlays,
  intra-line) — all non-syntax extmarks in one unified pass

Hoist new_code to function scope (needed by highlight_text outside the
use_ts block). Hoist at_raw_line so Phase 1d and Phase 2b share it.

Delete highlight_hunk_vim_syntax (redundant with inline path). Remove
the double-call from the deferred pass in init.lua.
2026-03-04 13:16:28 -05:00
..
commands.lua feat: unified diff conflict resolution for unmerged files (#99) 2026-02-09 12:21:13 -05:00
conflict.lua fix: pre-release cleanup for v0.2.0 (#102) 2026-02-09 15:08:36 -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 fix: pre-release cleanup for v0.2.0 (#102) 2026-02-09 15:08:36 -05:00
git.lua perf: cache repo root and harden async paths (#100) 2026-02-09 12:39:13 -05:00
health.lua feat(highlight): add character-level intra-line diff highlighting 2026-02-06 13:53:58 -05:00
highlight.lua refactor(highlight): unified per-line extmark builder in highlight_hunk 2026-03-04 13:16:28 -05:00
init.lua refactor(highlight): unified per-line extmark builder in highlight_hunk 2026-03-04 13:16:28 -05:00
lib.lua perf: cache repo root and harden async paths (#100) 2026-02-09 12:39:13 -05:00
log.lua performance improvements (#116) 2026-02-12 16:59:13 -05:00
merge.lua fix: pre-release cleanup for v0.2.0 (#102) 2026-02-09 15:08:36 -05:00
parser.lua feat(neogit): use new neogit apis for highlight and repo root (#133) 2026-02-25 11:42:59 -05:00