perf(util): properly check that Neovim is exiting. Dont run VeryLazy when that's the case

This commit is contained in:
Folke Lemaitre 2023-01-16 12:37:28 +01:00
parent e8cb863703
commit efe72d98e6
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 3 additions and 3 deletions

View File

@ -142,9 +142,9 @@ end
function M.very_lazy()
local function _load()
vim.schedule(function()
-- if vim.v.exiting then
-- return
-- end
if vim.v.exiting ~= vim.NIL then
return
end
vim.g.did_very_lazy = true
vim.api.nvim_exec_autocmds("User", { pattern = "VeryLazy", modeline = false })
end)