remove gitsigns autocmd on gitsigns load

This commit is contained in:
Lucario387 2022-09-08 20:49:47 +09:00 committed by Sidhanth Rathod
parent 5db641289d
commit f0c93c8472

View File

@ -78,9 +78,11 @@ M.mason_cmds = {
M.gitsigns = function() M.gitsigns = function()
autocmd({ "BufRead" }, { autocmd({ "BufRead" }, {
group = vim.api.nvim_create_augroup("GitSignsLazyLoad", { clear = true }),
callback = function() callback = function()
vim.fn.system("git rev-parse " .. vim.fn.expand "%:p:h") vim.fn.system("git rev-parse " .. vim.fn.expand "%:p:h")
if vim.v.shell_error == 0 then if vim.v.shell_error == 0 then
vim.api.nvim_del_augroup_by_name "GitSignsLazyLoad"
vim.schedule(function() vim.schedule(function()
require("packer").loader "gitsigns.nvim" require("packer").loader "gitsigns.nvim"
end) end)