diff --git a/NEWS.md b/NEWS.md index 9342acb2..c9bcf3e4 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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 + +- `hq` to show hunks as Quickfix [gitsigns](https://github.com/lewis6991/gitsigns.nvim) +- `hQ` to show hunks as Quickfix (all files) [gitsigns](https://github.com/lewis6991/gitsigns.nvim) +- `tb` to toggle current line blame [gitsigns](https://github.com/lewis6991/gitsigns.nvim) +- `tw` to toggle word diff [gitsigns](https://github.com/lewis6991/gitsigns.nvim) + ## 14.x Big new release with a lot of changes and improvements! diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index ce7a068c..4f86c3f9 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -72,6 +72,7 @@ return { { "f", group = "file/find" }, { "g", group = "git" }, { "gh", group = "hunks" }, + { "gt", group = "toggle" }, { "q", group = "quit/session" }, { "s", group = "search" }, { "u", group = "ui" }, @@ -183,6 +184,10 @@ return { map("n", "ghB", function() gs.blame() end, "Blame Buffer") map("n", "ghd", gs.diffthis, "Diff This") map("n", "ghD", function() gs.diffthis("~") end, "Diff This ~") + map("n", "ghq", gs.setqflist, "Show hunks as Quickfix") + map("n", "ghQ", function() gs.setqflist("all") end, "Show hunks as Quickfix (all)") + map("n", "gtb", gs.toggle_current_line_blame, "Toggle current line blame") + map("n", "gtw", gs.toggle_word_diff, "Toggle word diff") map({ "o", "x" }, "ih", ":Gitsigns select_hunk", "GitSigns Select Hunk") end, },