Skip to content

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.

-- ~/.config/blak/lua/blak/user.lua
return {
extras = {
enabled = {
"git.diffview",
},
},
}

Because this extra adds a plugin, run:

:BlakExtras sync
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.

Open the current working tree diff:

:DiffviewOpen

Compare the current branch to main:

:DiffviewOpen main...HEAD

Inspect the current file’s history:

<leader>gH

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 } },
},
},
}
:BlakExtras disable git.diffview
:BlakExtras sync

Restart Blak to unload already-registered commands and keymaps from the current session.