edit gitsigns

This commit is contained in:
leafee98 2024-05-07 20:50:23 +08:00
parent 534f1c8323
commit a10c30e139

View file

@ -12,13 +12,13 @@ return {
vim.keymap.set(mode, l, r, opts)
end
m("n", "<leader>hn", function()
m("n", "]h", function()
if vim.wo.diff then return "]c" end
vim.schedule(function() gs.next_hunk() end)
return "<Ignore>"
end, {expr=true})
m("n", "<leader>hp", function()
m("n", "[h", function()
if vim.wo.diff then return "[c" end
vim.schedule(function() gs.prev_hunk() end)
return "<Ignore>"
@ -31,7 +31,7 @@ return {
m("n", "<leader>hS", gs.stage_buffer)
m("n", "<leader>hu", gs.undo_stage_hunk)
m("n", "<leader>hR", gs.reset_buffer)
m("n", "<leader>hv", gs.preview_hunk)
m("n", "<leader>hp", gs.preview_hunk)
m("n", "<leader>hb", function() gs.blame_line{full=true} end)
m("n", "<leader>htb", gs.toggle_current_line_blame)
m("n", "<leader>hd", gs.diffthis)