diffs.nvim/spec
Barrett Ruth bbb87b660e fix(highlight): split old/new treesitter parsing
Problem: highlight_treesitter concatenated all hunk lines (context, -,
+) into a single string. Mixed old/new code produced invalid syntax
(e.g. two return statements), causing treesitter error recovery to drop
captures on lines after the syntax error.

Solution: split hunk lines into two versions — new (context + added)
and old (context + deleted) — each parsed independently. Use a line_map
to resolve treesitter row indices to buffer lines, with the old version
only mapping deleted lines to avoid duplicate extmarks on context.

Also fixes three related issues exposed by the improved TS coverage:

- Replace Normal extmark with DiffsClear (explicit fg from Normal.fg).
  Normal in extmarks doesn't reliably override vim :syntax foreground.

- Reorder priority stack to DiffsClear(198) < syntax(199) < line
  bg(200) < char bg(201). TS capture groups can carry colorscheme
  backgrounds that would override diff line backgrounds at higher
  priority.

- Gate DiffsClear on per-line coverage tracking. Only clear fugitive
  syntax fg on lines where TS/vim actually produced captures, preventing
  force-clearing on lines where error recovery drops captures.
2026-02-07 00:50:21 -05:00
..
commands_spec.lua feat(fugitive): line position tracking for keymaps 2026-02-05 00:27:35 -05:00
diff_spec.lua feat(config): replace algorithm 'auto'/'native' with 'default'/'vscode' 2026-02-06 21:23:40 -05:00
fugitive_spec.lua feat(fugitive): line position tracking for keymaps 2026-02-05 00:27:35 -05:00
git_spec.lua feat: add :Gdiff, :Gvdiff, :Ghdiff commands for unified diff view 2026-02-04 19:52:17 -05:00
helpers.lua fix(parser): detect filetype from file content (shebang/modeline) 2026-02-05 01:08:43 -05:00
highlight_spec.lua fix(highlight): split old/new treesitter parsing 2026-02-07 00:50:21 -05:00
init_spec.lua feat(config): use vim.g over .setup() 2026-02-03 16:18:55 -05:00
minimal_init.lua feat(test): testing infrastructure 2026-02-01 23:09:05 -05:00
parser_spec.lua fix(parser): detect filetype from file content (shebang/modeline) 2026-02-05 01:08:43 -05:00
read_buffer_spec.lua fix(commands): handle :e on diffs:// buffers via BufReadCmd 2026-02-06 22:21:33 -05:00