refactor(nvim)!: add opts option

This commit is contained in:
Moritz Böhme 2023-09-10 13:30:29 +02:00
parent 12a5420ee9
commit 6a125a1df6
No known key found for this signature in database
GPG key ID: 970C6E89EB0547A9
27 changed files with 273 additions and 238 deletions

View file

@ -0,0 +1,15 @@
require("gitsigns").setup()
require("which-key").register({
["[h"] = { "<cmd>Gitsigns prev_hunk<cr>", "Previous hunk" },
["]h"] = { "<cmd>Gitsigns next_hunk<cr>", "Next hunk" },
["<leader>g"] = {
s = { "<cmd>Gitsigns stage_hunk<cr>", "Stage hunk", mode = { "n", "v" } },
r = { "<cmd>Gitsigns reset_hunk<cr>", "Reset hunk", mode = { "n", "v" } },
S = { "<cmd>Gitsigns stage_buffer<cr>", "Stage buffer" },
R = { "<cmd>Gitsigns reset_buffer<cr>", "Reset buffer" },
u = { "<cmd>Gitsigns undo_stage_hunk<cr>", "Undo stage hunk" },
p = { "<cmd>Gitsigns preview_hunk_inline<cr>", "Preview hunk (inline)" },
P = { "<cmd>Gitsigns preview_hunk<cr>", "Preview hunk (float)" },
},
["ih"] = { ":<C-U>Gitsigns select_hunk<cr>", "gitsigns hunk", mode = { "o", "x" } },
})