return {
|
|
'goolord/alpha-nvim',
|
|
dependencies = {
|
|
'echasnovski/mini.icons',
|
|
{
|
|
"MaximilianLloyd/ascii.nvim",
|
|
dependencies = {
|
|
"MunifTanjim/nui.nvim"
|
|
},
|
|
},
|
|
},
|
|
config = function ()
|
|
local alpha = require("alpha")
|
|
local dashboard = require("alpha.themes.dashboard")
|
|
|
|
-- Set the ASCII art
|
|
dashboard.section.header.val = require("ascii").art.text.neovim.lean
|
|
|
|
-- Remove other sections (buttons, footer, etc.) to show only the ASCII art
|
|
dashboard.section.buttons.val = {}
|
|
dashboard.section.footer.val = {}
|
|
|
|
local function get_center_padding()
|
|
local total_lines = vim.fn.winheight(0)
|
|
local art_lines = #dashboard.section.header.val
|
|
return math.floor((total_lines - art_lines) / 2)
|
|
end
|
|
|
|
-- Center the header
|
|
dashboard.opts.layout = {
|
|
{ type = "padding", val = get_center_padding() }, -- Add some vertical padding
|
|
dashboard.section.header,
|
|
}
|
|
|
|
-- Set up alpha with the modified dashboard
|
|
alpha.setup(dashboard.opts)
|
|
end
|
|
}
|