Skip to content

feat: file navigation, review tracking, and diff improvements#23

Open
hay-kot wants to merge 8 commits into
mainfrom
feat/gf-tab-switch
Open

feat: file navigation, review tracking, and diff improvements#23
hay-kot wants to merge 8 commits into
mainfrom
feat/gf-tab-switch

Conversation

@hay-kot
Copy link
Copy Markdown
Collaborator

@hay-kot hay-kot commented Mar 12, 2026

Summary

  • File navigation: gf opens file in original tab instead of closing review, with split/vsplit support and gr to return
  • Review tracking: Mark files as reviewed with x, persisted across sessions, with visual indicators in file list
  • Diff gutter: Show old/new file line numbers in statuscolumn, hide on metadata lines, no separator borders
  • Hunk separators: Blank line between hunks for visual clarity
  • Comment fixes: Restore <leader>c binding, prevent note mode from overriding diff keymaps, show file line numbers instead of buffer lines in comments and exports
  • Highlight blending: Configurable diff.highlight_blend option to soften DiffAdd/DiffDelete backgrounds, adapts to colorscheme changes

Test plan

  • Open a diff review with DiffReview main
  • Verify gf opens file in original tab, gr returns to review
  • Mark files reviewed with x, close and reopen to verify persistence
  • Verify gutter shows correct file line numbers
  • Add single and range comments with <leader>c, verify file line numbers in display and export
  • Change colorscheme and verify diff highlights update
  • Test highlight_blend config option at various values

hay-kot added 8 commits March 11, 2026 22:25
Previously gf destroyed the review layout to open the file. Now it
switches to the original tab, preserving all review state. Use gr or
:DiffReviewReturn to switch back to the review.
Toggle files as reviewed with 'x' from either pane. Reviewed files
show a green checkmark and dimmed text. Progress counter (N/N) in
the stats header. State persists across sessions via the review JSON.
Replace buffer line numbers with actual old/new file line numbers
using statuscolumn. Context lines show both, added lines show only
new, deleted lines show only old. Width adapts to the max line number.
Distinguish hunk headers (@@) from file metadata (diff --git, index,
---, +++). Only hunk headers get the separator line in the gutter;
metadata lines show no gutter at all.
Only show line numbers for actual code lines. Hunk headers and
metadata lines get a blank gutter.
- Fix <leader>c by removing c/C from <Nop> block list
- Prevent note mode keymaps from overriding diff review keymaps
- Show file line numbers instead of buffer lines in comment display
- Highlight commented lines in custom statuscolumn gutter
- Hide line numbers on virtual text lines (vim.v.virtnum)
- Remove gutter border separator character
- Add blank separator lines between diff hunks
- Account for separator offsets in export and GitHub submit
- Remove emoji from export output
- Preserve diff add/delete highlights when comment_line_hl is unset
- Blend DiffAdd/DiffDelete backgrounds toward Normal bg for subtler tints
- Add diff.highlight_blend config option (0.0 = full color, 1.0 = invisible, default 0.60)
- Re-define highlights on ColorScheme change for theme switching
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant