From 720e06a908cbf6e3afb4eccc049d58df9ace770a Mon Sep 17 00:00:00 2001 From: filip Date: Sun, 21 Sep 2025 15:42:38 +0200 Subject: [PATCH] fix(keymaps): enable snacks git keybindings (#6323) ## Description Enable snacks git keybindings even if `lazygit` is not installed Related discussion: https://github.com/LazyVim/LazyVim/discussions/6322 ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/config/keymaps.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index acaf44d9..938a2333 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -163,12 +163,12 @@ end if vim.fn.executable("lazygit") == 1 then map("n", "gg", function() Snacks.lazygit( { cwd = LazyVim.root.git() }) end, { desc = "Lazygit (Root Dir)" }) map("n", "gG", function() Snacks.lazygit() end, { desc = "Lazygit (cwd)" }) - map("n", "gf", function() Snacks.picker.git_log_file() end, { desc = "Git Current File History" }) - map("n", "gl", function() Snacks.picker.git_log({ cwd = LazyVim.root.git() }) end, { desc = "Git Log" }) - map("n", "gL", function() Snacks.picker.git_log() end, { desc = "Git Log (cwd)" }) end +map("n", "gL", function() Snacks.picker.git_log() end, { desc = "Git Log (cwd)" }) map("n", "gb", function() Snacks.picker.git_log_line() end, { desc = "Git Blame Line" }) +map("n", "gf", function() Snacks.picker.git_log_file() end, { desc = "Git Current File History" }) +map("n", "gl", function() Snacks.picker.git_log({ cwd = LazyVim.root.git() }) end, { desc = "Git Log" }) map({ "n", "x" }, "gB", function() Snacks.gitbrowse() end, { desc = "Git Browse (open)" }) map({"n", "x" }, "gY", function() Snacks.gitbrowse({ open = function(url) vim.fn.setreg("+", url) end, notify = false })