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')