I'm trying to setup Neogit to open in my workspace directory instead of cwd. The problem is that I use multi root workspaces, so I usually set my cwd to be workspace1/..
. My initial try was to use something like this (I use NvChad):
M.neovim = {
n = {
["<leader>gg"] = {
function()
local neovim = require("neogit");
neovim.open({ cwd = vim.lsp.buf.list_workspace_folders()[0] })
end,
"Open Neogit in lsp cwd",
},
}
}
But that doesn't seem to do anything and Neogit uses workspace1/..
anyway :/
Any ideas?