Commit graph dotfiles/neovim/config/plugins/diffview.lua
Author SHA1 Message Date
e7b1d3aa83
Add a diff-against-branch keymap to diffview.nvim
gd only diffs the working tree against the index, so it shows nothing
once a branch's work is already committed - found this reviewing a
fully-committed branch, where it just showed blank panes.

gm prompts for a rev and opens DiffviewOpen <rev>...HEAD instead. The
prompt defaults to whatever the first remote's HEAD points to, since
the base branch name isn't consistent across repos (main here,
develop in jonnybarnes.uk).

Verified against jonnybarnes.uk's micropub-token-revocation branch:
default_branch() correctly resolved forge/HEAD to develop there vs
main in this repo, and DiffviewOpen develop...HEAD listed all 25
changed files.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013t7aQbc4EyYtab1crvSFTd
2026-08-14 10:55:50 +01:00
37253c8a7b
Add diffview.nvim for reviewing diffs and file history
Installed via vim.pack, matching how the other plugins here are
managed. Adds a new <leader>g "diff" group: gd opens a Diffview
against the index, gc closes it, gh shows history for the current
file, gH for the branch.

Verified headlessly: config/plugins loads clean, :DiffviewOpen is
registered, and opening/closing a Diffview against this repo works
with no errors.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013t7aQbc4EyYtab1crvSFTd
2026-08-14 09:53:21 +01:00