mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-25 10:18:47 +02:00
feat(alpha): load on VimEnter so we can track its performance
This commit is contained in:
parent
9b5dd50837
commit
93c5f84ebc
1 changed files with 4 additions and 5 deletions
|
@ -16,7 +16,6 @@ return {
|
||||||
-- better vim.ui
|
-- better vim.ui
|
||||||
{
|
{
|
||||||
"stevearc/dressing.nvim",
|
"stevearc/dressing.nvim",
|
||||||
event = "VeryLazy",
|
|
||||||
init = function()
|
init = function()
|
||||||
---@diagnostic disable-next-line: duplicate-set-field
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
vim.ui.select = function(...)
|
vim.ui.select = function(...)
|
||||||
|
@ -103,7 +102,7 @@ return {
|
||||||
-- dashboard
|
-- dashboard
|
||||||
{
|
{
|
||||||
"goolord/alpha-nvim",
|
"goolord/alpha-nvim",
|
||||||
lazy = false,
|
event = "VimEnter",
|
||||||
config = function()
|
config = function()
|
||||||
local dashboard = require("alpha.themes.dashboard")
|
local dashboard = require("alpha.themes.dashboard")
|
||||||
local logo = [[
|
local logo = [[
|
||||||
|
@ -134,14 +133,14 @@ return {
|
||||||
dashboard.section.buttons.opts.hl = "AlphaButtons"
|
dashboard.section.buttons.opts.hl = "AlphaButtons"
|
||||||
dashboard.opts.layout[1].val = 8
|
dashboard.opts.layout[1].val = 8
|
||||||
|
|
||||||
|
local alpha = require("alpha")
|
||||||
if vim.o.filetype == "lazy" then
|
if vim.o.filetype == "lazy" then
|
||||||
-- close and re-open Lazy after showing alpha
|
-- close and re-open Lazy after showing alpha
|
||||||
vim.notify("Missing plugins installed!", vim.log.levels.INFO, { title = "lazy.nvim" })
|
|
||||||
vim.cmd.close()
|
vim.cmd.close()
|
||||||
require("alpha").setup(dashboard.opts)
|
alpha.setup(dashboard.opts)
|
||||||
require("lazy").show()
|
require("lazy").show()
|
||||||
else
|
else
|
||||||
require("alpha").setup(dashboard.opts)
|
alpha.setup(dashboard.opts)
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("User", {
|
vim.api.nvim_create_autocmd("User", {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue