From 1e67dc0d56b8e7cf6befdc7176a4a54e17afc244 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 16 Jan 2023 12:29:19 +0100 Subject: [PATCH] perf(util): dont trigger VeryLazy autocmds when exiting --- lua/lazy/core/util.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/lazy/core/util.lua b/lua/lazy/core/util.lua index bc7720de..58874d32 100644 --- a/lua/lazy/core/util.lua +++ b/lua/lazy/core/util.lua @@ -142,6 +142,9 @@ end function M.very_lazy() local function _load() vim.schedule(function() + if vim.v.exiting then + return + end vim.g.did_very_lazy = true vim.api.nvim_exec_autocmds("User", { pattern = "VeryLazy", modeline = false }) end)