From 1383117bd3f3fb51bffa38384a7e9f73e6229d3b Mon Sep 17 00:00:00 2001 From: tomaswyz Date: Wed, 15 Jun 2022 22:26:10 +0800 Subject: [PATCH] Update lazy_load.lua just check dir ,not check every file --- lua/core/lazy_load.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index 30f3578..d86c8b4 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -85,7 +85,7 @@ end M.gitsigns = function() -- taken from https://github.com/max397574 - vim.api.nvim_create_autocmd({ "BufAdd", "VimEnter" }, { + vim.api.nvim_create_autocmd({ "BufRead" }, { callback = function() local function onexit(code, _) if code == 0 then @@ -100,7 +100,7 @@ M.gitsigns = function() args = { "ls-files", "--error-unmatch", - vim.fn.expand "%", + vim.fn.expand "%:p:h", }, }, onexit) end