From 84d91336e59176f502a7fea6d2177851a0bc9baa Mon Sep 17 00:00:00 2001 From: Dinesh Salunke Date: Sun, 10 Sep 2023 12:45:19 +0530 Subject: [PATCH] refactor: minor cleanup --- lua/plugins/ui.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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)