diff --git a/lua/plugin/gitsigns.lua b/lua/plugin/gitsigns.lua index 338e99d..de1c022 100644 --- a/lua/plugin/gitsigns.lua +++ b/lua/plugin/gitsigns.lua @@ -15,23 +15,12 @@ return { opts.buffer = bufnr vim.keymap.set(mode, l, r, opts) end - - -- Navigation - map('n', ']c', function() - if vim.wo.diff then return ']c' end - vim.schedule(function() gs.next_hunk() end) - return '' - end, { expr = true }) - - map('n', '[c', function() - if vim.wo.diff then return '[c' end - vim.schedule(function() gs.prev_hunk() end) - return '' - end, { expr = true }) - - -- Actions map('n', 'gB', function() gs.blame_line { full = true } end) map('n', 'gb', gs.toggle_current_line_blame) + map('n', 'gs', gs.stage_hunk) -- git stage this + map('v', 'gs', gs.stage_hunk) -- git stage this + map('n', 'gus', gs.undo_stage_hunk) -- git undo stage this + map('v', 'gus', gs.undo_stage_hunk) -- git undo stage this end }) end,