Skip to content

Commit

Permalink
feat(alpha): load on VimEnter so we can track its performance
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jan 2, 2023
1 parent 9b5dd50 commit 93c5f84
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lua/lazyvim/plugins/ui.lua
Expand Up @@ -16,7 +16,6 @@ return {
-- better vim.ui
{
"stevearc/dressing.nvim",
event = "VeryLazy",
init = function()
---@diagnostic disable-next-line: duplicate-set-field
vim.ui.select = function(...)
Expand Down Expand Up @@ -103,7 +102,7 @@ return {
-- dashboard
{
"goolord/alpha-nvim",
lazy = false,
event = "VimEnter",
config = function()
local dashboard = require("alpha.themes.dashboard")
local logo = [[
Expand Down Expand Up @@ -134,14 +133,14 @@ return {
dashboard.section.buttons.opts.hl = "AlphaButtons"
dashboard.opts.layout[1].val = 8

local alpha = require("alpha")
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)
alpha.setup(dashboard.opts)
require("lazy").show()
else
require("alpha").setup(dashboard.opts)
alpha.setup(dashboard.opts)
end

vim.api.nvim_create_autocmd("User", {
Expand Down

0 comments on commit 93c5f84

Please sign in to comment.