diff --git a/lua/plugins/ui.lua b/lua/plugins/ui.lua index 1024f8b..69d58cc 100644 --- a/lua/plugins/ui.lua +++ b/lua/plugins/ui.lua @@ -156,13 +156,14 @@ return { return dashboard end, config = function(_, dashboard) + local lazy = require("lazy") -- close Lazy and re-open when the dashboard is ready if vim.o.filetype == "lazy" then vim.cmd.close() vim.api.nvim_create_autocmd("User", { pattern = "AlphaReady", callback = function() - require("lazy").show() + lazy.show() end, }) end @@ -172,7 +173,7 @@ return { vim.api.nvim_create_autocmd("User", { pattern = "LazyVimStarted", callback = function() - local stats = require("lazy").stats() + local stats = lazy.stats() local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100) dashboard.section.footer.val = "⚡ Neovim loaded " .. stats.count .. " plugins in " .. ms .. "ms" pcall(vim.cmd.AlphaRedraw)