Skip to content

Commit

Permalink
fix(alpha): make alpha and lazy ui behave with each other
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jan 3, 2023
1 parent bf8f5b3 commit aae683f
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lua/lazyvim/plugins/ui.lua
Expand Up @@ -142,16 +142,18 @@ return {
dashboard.section.buttons.opts.hl = "AlphaButtons"
dashboard.opts.layout[1].val = 8

local alpha = require("alpha")
-- close Lazy and re-open when the dashboard is ready
if vim.o.filetype == "lazy" then
-- close and re-open Lazy after showing alpha
vim.cmd.close()
alpha.setup(dashboard.opts)
require("lazy").show()
else
alpha.setup(dashboard.opts)
vim.api.nvim_create_autocmd("User", {
pattern = "AlphaReady",
callback = function()
require("lazy").show()
end,
})
end

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

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

0 comments on commit aae683f

Please sign in to comment.