Diffview Extra
git.diffview adds diffview-plus.nvim
for reviewing file changes, branch diffs, and file history in a dedicated
interface. It is the maintained fork of sindrets/diffview.nvim, which has had
no commits since June 2024; commands and the diffview module are unchanged,
so Neogit’s diffview integration keeps working. Blak follows its tagged
releases.
Enable it
Section titled “Enable it”-- ~/.config/blak/lua/blak/user.luareturn { extras = { enabled = { "git.diffview", }, },}Because this extra adds a plugin, run:
:BlakExtras syncWhat it adds
Section titled “What it adds”| Surface | Contribution |
|---|---|
| Plugin | dlyongemallo/diffview-plus.nvim (tagged releases) |
| Dependency | mini.icons for file icons |
| Command | :DiffviewOpen, :DiffviewClose, :DiffviewToggle |
| Command | :DiffviewFileHistory, :DiffviewDiffFiles, :DiffviewLog |
| Keymap | <leader>gD opens Diffview |
| Keymap | <leader>gH opens file history for the current file |
The keymaps appear in :BlakKeys.
Common workflows
Section titled “Common workflows”Open the current working tree diff:
:DiffviewOpenCompare the current branch to main:
:DiffviewOpen main...HEADInspect the current file’s history:
<leader>gHuser.lua configuration
Section titled “user.lua configuration”The Blak extra intentionally keeps Diffview’s plugin options at their defaults.
Your user.lua only needs to opt into the extra:
return { extras = { enabled = { "git.diffview" }, },}To change Diffview options, add a matching lazy.nvim spec in plugins.specs;
lazy.nvim merges it with the extra’s spec:
return { extras = { enabled = { "git.diffview" } }, plugins = { specs = { { "dlyongemallo/diffview-plus.nvim", opts = { enhanced_diff_hl = true } }, }, },}Disable it
Section titled “Disable it”:BlakExtras disable git.diffview:BlakExtras syncRestart Blak to unload already-registered commands and keymaps from the current session.