Skip to content

Commit

Permalink
gitsigns: fix mapped functions
Browse files Browse the repository at this point in the history
  • Loading branch information
gvolpe committed Mar 31, 2024
1 parent b87a2e5 commit 81b064d
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions modules/git/git.nix
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,6 @@ in
return '<Ignore>'
end
local function stageHunk()
gs.stage_hunk {vim.fn.line('.'), vim.fn.line('v')}
end
local function resetHunk()
gs.reset_hunk {vim.fn.line('.'), vim.fn.line('v')}
end
-- Actions
${writeIf keys.enable ''
wk.register({
Expand All @@ -69,10 +61,10 @@ in
td = { gs.toggle_deleted, "Toggle deleted" },
d = { gs.diffthis, "Diff current file" },
D = { function() gs.diffthis('~') end, "Diff file" },
n = { nextHunk(), "Next hunk" },
p = { prevHunk(), "Previous hunk" },
r = { resetHunk(), "Reset hunk" },
s = { stageHunk(), "Stage hunk" },
n = { nextHunk, "Next hunk" },
p = { prevHunk, "Previous hunk" },
r = { gs.reset_hunk, "Reset hunk" },
s = { gs.stage_hunk, "Stage hunk" },
S = { gs.stage_buffer, "Stage buffer" },
u = { gs.undo_stage_hunk, "Undo stage hunk" },
R = { gs.reset_buffer, "Reset buffer" },
Expand Down

0 comments on commit 81b064d

Please sign in to comment.