Skip to content

Commit

Permalink
fix(gitsigns): update deprecated hunk nav mappings (#2935)
Browse files Browse the repository at this point in the history
  • Loading branch information
lkhphuc committed May 15, 2024
1 parent 9337db1 commit fc5ee49
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lua/lazyvim/plugins/editor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,10 @@ return {
end

-- stylua: ignore start
map("n", "]h", gs.next_hunk, "Next Hunk")
map("n", "[h", gs.prev_hunk, "Prev Hunk")
map("n", "]h", function() gs.nav_hunk("next") end, "Next Hunk")
map("n", "[h", function() gs.nav_hunk("prev") end, "Prev Hunk")
map("n", "]H", function() gs.nav_hunk("last") end, "Last Hunk")
map("n", "[H", function() gs.nav_hunk("first") end, "First Hunk")
map({ "n", "v" }, "<leader>ghs", ":Gitsigns stage_hunk<CR>", "Stage Hunk")
map({ "n", "v" }, "<leader>ghr", ":Gitsigns reset_hunk<CR>", "Reset Hunk")
map("n", "<leader>ghS", gs.stage_buffer, "Stage Buffer")
Expand Down

0 comments on commit fc5ee49

Please sign in to comment.