From 2c37492461bf6af09a3e940f8b3ea0a123608bfd Mon Sep 17 00:00:00 2001 From: Ben Elan Date: Fri, 22 Nov 2024 03:25:33 -0800 Subject: [PATCH] fix(snacks): remove lazygit requirement for git browse/blame keymaps (#4869) ## Description The Snacks keymaps for `gitbrowse()` and `git.blame_line()` were in a conditional checking if `lazygit` is installed. But both work without `lazygit`. ## Related Issue(s) N/A ## Screenshots N/A ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/config/keymaps.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index 2b86010f..3283b0d8 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -138,13 +138,14 @@ 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", "gb", function() Snacks.git.blame_line() end, { desc = "Git Blame Line" }) - map({ "n", "x" }, "gB", function() Snacks.gitbrowse() end, { desc = "Git Browse" }) map("n", "gf", function() Snacks.lazygit.log_file() end, { desc = "Lazygit Current File History" }) map("n", "gl", function() Snacks.lazygit.log({ cwd = LazyVim.root.git() }) end, { desc = "Lazygit Log" }) map("n", "gL", function() Snacks.lazygit.log() end, { desc = "Lazygit Log (cwd)" }) end +map("n", "gb", function() Snacks.git.blame_line() end, { desc = "Git Blame Line" }) +map({ "n", "x" }, "gB", function() Snacks.gitbrowse() end, { desc = "Git Browse" }) + -- quit map("n", "qq", "qa", { desc = "Quit All" })