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/..
.
(mapping formatting My initial try was to use something like this -> I(I use NvChad)
Solved mostly with:
M.neovim = {
n = {
["<leader>gg"] = {
function()
local neovim = require("neogit");
neovim.open({ cwd = vim.lsp.buf.list_workspace_folders()[1][0] })
end,
"Open Neogit in lsp cwd",
},
}
}
This is assuming I don't change the workspace after launching vim.But that doesn't seem to do anything and Neogit uses workspace1/..
anyway :/
Any ideas?