mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-23 17:28:57 +02:00
fix(alpha): make alpha and lazy ui behave with each other
This commit is contained in:
parent
bf8f5b31f3
commit
aae683f868
1 changed files with 8 additions and 6 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue