feat(notify): delay notifs till replaced or at most 500ms to prevent more prompts

This commit is contained in:
Folke Lemaitre 2023-01-10 23:00:56 +01:00
parent 3dd367caac
commit 701337fac8
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
4 changed files with 52 additions and 10 deletions

View file

@ -128,6 +128,20 @@ function M.load(name)
end
end
M.did_init = false
function M.init()
if not M.did_init then
M.did_init = true
-- delay notifications till vim.notify was replaced or after 500ms
require("lazyvim.util").lazy_notify()
-- load options here, before lazy init while sourcing plugin modules
-- this is needed to make sure options will be correctly applied
-- after installing missing plugins
require("lazyvim.config").load("options")
end
end
setmetatable(M, {
__index = function(_, key)
if options == nil then