fix(lazygit): make sure we start lazygit in a valid git root

This commit is contained in:
Folke Lemaitre 2024-03-18 11:23:55 +01:00
parent 864c58cae6
commit d8d380a60e
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 8 additions and 1 deletions

View file

@ -126,7 +126,7 @@ map("n", "<leader>uT", function() if vim.b.ts_highlight then vim.treesitter.stop
map("n", "<leader>ub", function() Util.toggle("background", false, {"light", "dark"}) end, { desc = "Toggle Background" })
-- lazygit
map("n", "<leader>gg", function() Util.terminal({ "lazygit" }, { cwd = Util.root(), esc_esc = false, ctrl_hjkl = false }) end, { desc = "Lazygit (root dir)" })
map("n", "<leader>gg", function() Util.terminal({ "lazygit" }, { cwd = Util.root.git(), esc_esc = false, ctrl_hjkl = false }) end, { desc = "Lazygit (root dir)" })
map("n", "<leader>gG", function() Util.terminal({ "lazygit" }, {esc_esc = false, ctrl_hjkl = false}) end, { desc = "Lazygit (cwd)" })
map("n", "<leader>gf", function()