add more gitsigns mappings

pull/2729/head
KorigamiK 3 months ago committed by GitHub
parent cf1db9821a
commit f4e642fa36
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -20,6 +20,28 @@ local options = {
map("n", "<leader>rh", gs.reset_hunk, opts "Reset Hunk")
map("n", "<leader>ph", gs.preview_hunk, opts "Preview Hunk")
map("n", "<leader>gb", gs.blame_line, opts "Blame Line")
map("n", "<leader>td", gs.toggle_deleted, opts "Toggle deleted")
map("n", "]c", function()
if vim.wo.diff then
return "]c"
end
vim.schedule(function()
require("gitsigns").next_hunk()
end)
return "<Ignore>"
end, { desc = "Jump to next hunk", expr = true })
map("n", "[c", function()
if vim.wo.diff then
return "[c"
end
vim.schedule(function()
require("gitsigns").prev_hunk()
end)
return "<Ignore>"
end, { desc = "Jump to prev hunk", expr = true })
end,
}

Loading…
Cancel
Save