From 79f74abd60db2f7a8114e3056f41b576ff1ef7c8 Mon Sep 17 00:00:00 2001 From: Roey Darwish Dror Date: Tue, 29 Oct 2024 23:53:18 +0200 Subject: [PATCH] Fix Lazygit file history when cwd is outside the repo --- lua/lazyvim/config/keymaps.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index a6f1c574..44294e34 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -137,7 +137,7 @@ map("n", "gB", LazyVim.lazygit.browse, { desc = "Git Browse" }) map("n", "gf", function() local git_path = vim.api.nvim_buf_get_name(0) - LazyVim.lazygit({args = { "-f", vim.trim(git_path) }}) + LazyVim.lazygit({args = { "-f", vim.trim(git_path) }, cwd = LazyVim.root.git()}) end, { desc = "Lazygit Current File History" }) map("n", "gl", function()