feat: add some more options for git diff

This commit is contained in:
2026-09-15 20:20:00 +02:00
parent 1203d6be6c
commit 3b18b6c7c0
2 changed files with 11 additions and 0 deletions
+7
View File
@@ -82,7 +82,14 @@ nmap_leader('fS', function() MiniExtra.pickers.lsp({ scope = 'document_symbol' }
nmap_leader('f:', function() MiniExtra.pickers.history({ scope = ':' }) end, 'Command history')
-- Git
local diff_unstaged = function()
vim.cmd.diffthis()
vim.cmd('vert Git show :./%')
vim.cmd.diffthis()
end
nmap_leader('ga', function() vim.cmd('Git add %') end, 'Add current file')
nmap_leader('gd', diff_unstaged, 'Diff unstaged')
nmap_leader('go', function() MiniDiff.toggle_overlay() end, 'Toggle overlay')
nmap_leader('gs', function() MiniGit.show_at_cursor() end, 'Show at cursor')
xmap_leader('gs', function() MiniGit.show_at_cursor() end, 'Show at selection')
+4
View File
@@ -3,6 +3,10 @@ Config.now(function()
vim.pack.add({ { src = 'https://github.com/rose-pine/neovim', name = 'rose-pine' } })
require('rose-pine').setup({
enable = { terminal = false, legacy_highlights = false, migrations = false },
highlight_groups = {
MiniDiffOverAdd = { fg = 'NONE', bg = 'foam', blend = 20 },
MiniDiffOverChangeBuf = { bg = 'rose', blend = 20 },
},
})
vim.cmd.colorscheme('rose-pine')