Skip to content

Commit

Permalink
fix(alpha): make sure alpha renders when Lazy is open after installin…
Browse files Browse the repository at this point in the history
…g missing plugins
  • Loading branch information
folke committed Jan 1, 2023
1 parent 3b700fc commit 670daaa
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lua/plugins/ui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,16 @@ return {
dashboard.section.buttons.opts.hl = "AlphaButtons"
dashboard.opts.layout[1].val = 8

if vim.bo[0].filetype == "lazy" then
vim.notify("Missing plugins installed!", vim.log.levels.INFO, { title = "LazyVim" })
if vim.o.filetype == "lazy" then
-- close and re-open Lazy after showing alpha
vim.notify("Missing plugins installed!", vim.log.levels.INFO, { title = "lazy.nvim" })
vim.cmd.close()
require("alpha").setup(dashboard.opts)
require("lazy").show()
else
require("alpha").setup(dashboard.opts)
end

require("alpha").setup(dashboard.opts)

vim.api.nvim_create_autocmd("User", {
pattern = "LazyVimStarted",
callback = function()
Expand Down

0 comments on commit 670daaa

Please sign in to comment.