forked from dineshsalunke/nvim-config
refactor: minor cleanup
This commit is contained in:
parent
7ee7e93a47
commit
84d91336e5
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user