fix: not detecting subdir in git repo

This commit is contained in:
Lucario387 2022-08-15 19:26:25 +09:00 committed by Sidhanth Rathod
parent be6d1f995f
commit 8e8d18ed8d
1 changed files with 5 additions and 5 deletions

View File

@ -79,11 +79,11 @@ M.mason_cmds = {
M.gitsigns = function()
autocmd({ "BufRead" }, {
callback = function()
if vim.fn.isdirectory ".git" ~= 0 then
vim.schedule(function()
require("packer").loader "gitsigns.nvim"
end)
end
vim.fn.system([[git rev-parse 2>/dev/null]])
if vim.v.shell_error == 0 then
vim.schedule(function()
require("packer").loader "gitsigns.nvim"
end)
end,
})
end