From ec02325590eda4fcc6f67b3807c0bcfa7d75527d Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Tue, 14 Apr 2026 23:43:12 +0200 Subject: [PATCH 1/4] feat(gitsigns): added 4 more gitsigns keymaps --- NEWS.md | 7 +++++++ lua/lazyvim/plugins/editor.lua | 5 +++++ 2 files changed, 12 insertions(+) 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, }, From 397e1c3a2bb7110ba3cb322aeeb68090f77c61da Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Wed, 15 Apr 2026 23:56:21 +0200 Subject: [PATCH 2/4] fix(refactoring): removed duplicated keymapping, added "inline function" keymap --- NEWS.md | 1 + .../plugins/extras/editor/refactoring.lua | 17 +++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/NEWS.md b/NEWS.md index c9bcf3e4..8a669a78 100644 --- a/NEWS.md +++ b/NEWS.md @@ -24,6 +24,7 @@ Going forward, **LazyVim** requires **Neovim** `>= 0.11.2`, and drops support fo - `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) +- `rI` to inline function [refactoring](https://github.com/ThePrimeagen/refactoring.nvim) ## 14.x diff --git a/lua/lazyvim/plugins/extras/editor/refactoring.lua b/lua/lazyvim/plugins/extras/editor/refactoring.lua index 11ab3786..dedc9f11 100644 --- a/lua/lazyvim/plugins/extras/editor/refactoring.lua +++ b/lua/lazyvim/plugins/extras/editor/refactoring.lua @@ -46,6 +46,15 @@ return { desc = "Inline Variable", expr = true, }, + { + "rI", + function() + return require("refactoring").refactor("Inline Function") + end, + mode = { "n", "x" }, + desc = "Inline Function", + expr = true, + }, { "rb", function() @@ -113,14 +122,6 @@ return { desc = "Extract Variable", expr = true, }, - { - "rp", - function() - require("refactoring").debug.print_var() - end, - mode = { "n", "x" }, - desc = "Debug Print Variable", - }, }, opts = { prompt_func_return_type = { From b3ac8a8aec30d53ededa525eae76672bccf4c9b6 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Fri, 17 Apr 2026 00:03:55 +0200 Subject: [PATCH 3/4] feat(gitsigns): reworked as suggested in PR comments --- NEWS.md | 10 +++--- lua/lazyvim/plugins/editor.lua | 40 ++++++++++++++++++++--- lua/lazyvim/plugins/extras/editor/fzf.lua | 1 + 3 files changed, 42 insertions(+), 9 deletions(-) diff --git a/NEWS.md b/NEWS.md index 8a669a78..9bb6809a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -20,10 +20,12 @@ Going forward, **LazyVim** requires **Neovim** `>= 0.11.2`, and drops support fo ### 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) +- `uH` to toggle LSP Codelens [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) +- `sp` to pick a picker [fzf-lua](https://github.com/ibhagwan/fzf-lua) +- `xh` to show file hunks as Quickfix [gitsigns](https://github.com/lewis6991/gitsigns.nvim) +- `xH` to show project hunks as Quickfix [gitsigns](https://github.com/lewis6991/gitsigns.nvim) +- `uB` to toggle current line blame [gitsigns](https://github.com/lewis6991/gitsigns.nvim) +- `uW` to toggle word diff [gitsigns](https://github.com/lewis6991/gitsigns.nvim) - `rI` to inline function [refactoring](https://github.com/ThePrimeagen/refactoring.nvim) ## 14.x diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index 4f86c3f9..00fb5667 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -72,7 +72,6 @@ return { { "f", group = "file/find" }, { "g", group = "git" }, { "gh", group = "hunks" }, - { "gt", group = "toggle" }, { "q", group = "quit/session" }, { "s", group = "search" }, { "u", group = "ui" }, @@ -184,11 +183,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") + + map("n", "xh", gs.setqflist, "Git hunks (file)") + map("n", "xH", function() gs.setqflist("all") end, "Git hunks (all)") end, }, }, @@ -204,6 +202,38 @@ return { require("gitsigns").toggle_signs(state) end, }):map("uG") + Snacks.toggle({ + name = "Git Line Blame", + get = function() + return require("gitsigns.config").config.current_line_blame + end, + set = function(state) + require("gitsigns").toggle_current_line_blame(state) + end, + }):map("uB") + Snacks.toggle({ + name = "Git Word Diff", + get = function() + return require("gitsigns.config").config.word_diff + end, + set = function(state) + require("gitsigns").toggle_word_diff(state) + end, + }):map("uW") + end, + }, + { + "neovim/nvim-lspconfig", + opts = function() + Snacks.toggle({ + name = "LSP Codelens", + get = function() + return vim.lsp.codelens.is_enabled() + end, + set = function(state) + vim.lsp.codelens.enable(state) + end, + }):map("uH") end, }, diff --git a/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index 4f703405..3634b067 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -249,6 +249,7 @@ return { { "sl", "FzfLua loclist", desc = "Location List" }, { "sM", "FzfLua man_pages", desc = "Man Pages" }, { "sm", "FzfLua marks", desc = "Jump to Mark" }, + { "sp", "FzfLua builtin fuzzy=true", desc = "FZF pickers" }, { "sR", "FzfLua resume", desc = "Resume" }, { "sq", "FzfLua quickfix", desc = "Quickfix List" }, { "sw", LazyVim.pick("grep_cword"), desc = "Word (Root Dir)" }, From 02c228bb2fde4e53314d7f0af2da7a8f56aac64d Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Fri, 17 Apr 2026 21:40:52 +0200 Subject: [PATCH 4/4] feat(toggle): reworked as suggested in PR comments --- lua/lazyvim/config/keymaps.lua | 1 + lua/lazyvim/plugins/editor.lua | 14 -------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index 9651e4e6..dc3acfb2 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -153,6 +153,7 @@ Snacks.toggle.option("background", { off = "light", on = "dark" , name = "Dark B Snacks.toggle.dim():map("uD") Snacks.toggle.animate():map("ua") Snacks.toggle.indent():map("ug") +Snacks.toggle.codelens():map("uH") Snacks.toggle.scroll():map("uS") Snacks.toggle.profiler():map("dpp") Snacks.toggle.profiler_highlights():map("dph") diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index 00fb5667..864e7b3b 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -222,20 +222,6 @@ return { }):map("uW") end, }, - { - "neovim/nvim-lspconfig", - opts = function() - Snacks.toggle({ - name = "LSP Codelens", - get = function() - return vim.lsp.codelens.is_enabled() - end, - set = function(state) - vim.lsp.codelens.enable(state) - end, - }):map("uH") - end, - }, -- better diagnostics list and others {