From f0c93c847284984680b370fca872012c9e9b0492 Mon Sep 17 00:00:00 2001 From: Lucario387 Date: Thu, 8 Sep 2022 20:49:47 +0900 Subject: [PATCH] remove gitsigns autocmd on gitsigns load --- lua/core/lazy_load.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index 5872cb6..ae7480f 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -78,9 +78,11 @@ M.mason_cmds = { M.gitsigns = function() autocmd({ "BufRead" }, { + group = vim.api.nvim_create_augroup("GitSignsLazyLoad", { clear = true }), callback = function() vim.fn.system("git rev-parse " .. vim.fn.expand "%:p:h") if vim.v.shell_error == 0 then + vim.api.nvim_del_augroup_by_name "GitSignsLazyLoad" vim.schedule(function() require("packer").loader "gitsigns.nvim" end)