& I would like to load
gitsigns only when the current working directory is a local
git repository. I tried configuring
packer with the following code:
config = function()
cond = function()
if vim.api.nvim_command_output("!git rev-parse --is-inside-work-tree") == true then
packer still loads
gitsigns even when the current working directory isn’t a local
So, how do I go about configuring
packer to only load
gitsigns when the conditions are right?
October 23, 2022, 7:28am
Can you check if gitsigns is in ~/.local/share/nvim/site/pack/packer/start ?
If yes, I believe you should run a PackerUpdate so that it moves gitsigns to ~/.local/share/nvim/site/pack/packer/opt so that it can be sourced on demand.
I’m pretty sure
gitsigns to the right folder i.e
~/.local/share/nvim/site/pack/packer/opt/gitsigns.nvim. See the screenshot(s) below:
gitsigns is in the
gitsigns doesn’t exist in the
gitsigns is loaded in a “
non-git repository”, see screenshot below for reference.
Also for reference, here’s proof of this said directory which is not a local
I’m probably misinterpreting something here (I guess?) because everything appears to be properly in place