feat(gitsigns): added 4 more gitsigns keymaps

This commit is contained in:
Oleg Kostyuk 2026-04-14 23:43:12 +02:00
parent 83d90f339d
commit ec02325590
2 changed files with 12 additions and 0 deletions

View file

@ -18,6 +18,13 @@ Going forward, **LazyVim** requires **Neovim** `>= 0.11.2`, and drops support fo
- enabled [blink.cmp](https://github.com/saghen/blink.cmp) **cmdline** completions
- use **LSP** based folding when available (disable with `nvim-lspconfig.folds.enabled = false`)
### Keymaps
- `<leader>hq` to show hunks as Quickfix [gitsigns](https://github.com/lewis6991/gitsigns.nvim)
- `<leader>hQ` to show hunks as Quickfix (all files) [gitsigns](https://github.com/lewis6991/gitsigns.nvim)
- `<leader>tb` to toggle current line blame [gitsigns](https://github.com/lewis6991/gitsigns.nvim)
- `<leader>tw` to toggle word diff [gitsigns](https://github.com/lewis6991/gitsigns.nvim)
## 14.x
Big new release with a lot of changes and improvements!

View file

@ -72,6 +72,7 @@ return {
{ "<leader>f", group = "file/find" },
{ "<leader>g", group = "git" },
{ "<leader>gh", group = "hunks" },
{ "<leader>gt", group = "toggle" },
{ "<leader>q", group = "quit/session" },
{ "<leader>s", group = "search" },
{ "<leader>u", group = "ui" },
@ -183,6 +184,10 @@ return {
map("n", "<leader>ghB", function() gs.blame() end, "Blame Buffer")
map("n", "<leader>ghd", gs.diffthis, "Diff This")
map("n", "<leader>ghD", function() gs.diffthis("~") end, "Diff This ~")
map("n", "<leader>ghq", gs.setqflist, "Show hunks as Quickfix")
map("n", "<leader>ghQ", function() gs.setqflist("all") end, "Show hunks as Quickfix (all)")
map("n", "<leader>gtb", gs.toggle_current_line_blame, "Toggle current line blame")
map("n", "<leader>gtw", gs.toggle_word_diff, "Toggle word diff")
map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>", "GitSigns Select Hunk")
end,
},