14 lines
882 B
Lua
14 lines
882 B
Lua
require("gitsigns").setup()
|
|
require("which-key").add({
|
|
{ "<leader>gP", "<cmd>Gitsigns preview_hunk<cr>", desc = "Preview hunk (float)" },
|
|
{ "<leader>gR", "<cmd>Gitsigns reset_buffer<cr>", desc = "Reset buffer" },
|
|
{ "<leader>gS", "<cmd>Gitsigns stage_buffer<cr>", desc = "Stage buffer" },
|
|
{ "<leader>gp", "<cmd>Gitsigns preview_hunk_inline<cr>", desc = "Preview hunk (inline)" },
|
|
{ "<leader>gu", "<cmd>Gitsigns undo_stage_hunk<cr>", desc = "Undo stage hunk" },
|
|
{ "[h", "<cmd>Gitsigns prev_hunk<cr>", desc = "Previous hunk" },
|
|
{ "]h", "<cmd>Gitsigns next_hunk<cr>", desc = "Next hunk" },
|
|
{ "<leader>gr", "<cmd>Gitsigns reset_hunk<cr>", desc = "Reset hunk", mode = { "n", "v" } },
|
|
{ "<leader>gs", "<cmd>Gitsigns stage_hunk<cr>", desc = "Stage hunk", mode = { "n", "v" } },
|
|
{ "ih", ":<C-U>Gitsigns select_hunk<cr>", desc = "gitsigns hunk", mode = { "o", "x" } },
|
|
})
|