diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 7782ee69..95c00eaf 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -316,11 +316,13 @@ return { return dashboard end, config = function(_, dashboard) + local laststatus = vim.o.laststatus vim.o.laststatus = 0 -- 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", { + once = true, pattern = "AlphaReady", callback = function() require("lazy").show() @@ -328,9 +330,18 @@ return { }) end + vim.api.nvim_create_autocmd("BufUnload", { + once = true, + buffer = vim.api.nvim_get_current_buf(), + callback = function() + vim.opt.laststatus = laststatus + end, + }) + require("alpha").setup(dashboard.opts) vim.api.nvim_create_autocmd("User", { + once = true, pattern = "LazyVimStarted", callback = function() local stats = require("lazy").stats()