2023-03-04 13:22:48 +01:00
|
|
|
require("gitsigns").setup()
|
2024-08-18 13:03:18 +02:00
|
|
|
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" } },
|
2023-08-16 16:41:12 +02:00
|
|
|
})
|