feat: add some more options for git diff
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user