From 2f864fbed05309003d8aac9fd4c27ed07e1bbf28 Mon Sep 17 00:00:00 2001 From: Muhammad Nauman Raza Date: Tue, 16 Jan 2024 20:51:47 +0000 Subject: [PATCH] feat: neogit use current buffer as cwd Current working directory for git is now the current buffer. --- lua/core/keybinds.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/core/keybinds.lua b/lua/core/keybinds.lua index 879622a..52d2229 100644 --- a/lua/core/keybinds.lua +++ b/lua/core/keybinds.lua @@ -23,8 +23,9 @@ wk.register({ }, g = { name = "git", - p = { "Neogit cwd=%:p:h push", "Push Popup" }, - c = { "Neogit cwd=%:p:h commit", "Commit Popup" }, + p = { "Neogit cwd=" .. vim.fn.expand("%:p:h") .. " push", "Push Popup" }, + c = { "Neogit cwd=" .. vim.fn.expand("%:p:h") .. " commit", "Commit Popup" }, + g = { "Neogit", "Neogit" }, }, ["."] = { ":e ", "Edit File", silent = false }, }, { prefix = "" })