Add dashboard.

This commit is contained in:
Henry Denny 2024-03-21 15:09:52 +00:00
parent 24e3d13728
commit a3cd5b8ad6
1 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,30 @@
return {
'goolord/alpha-nvim',
dependencies = {
'nvim-tree/nvim-web-devicons',
'nvim-lua/plenary.nvim'
},
config = function()
local alpha = require('alpha')
local dashboard = require('alpha.themes.dashboard')
dashboard.section.header.val = {
" ▄ ▄███▄ ████▄ ▄ ▄█ █▀▄▀█",
" █ █▀ ▀ █ █ █ ██ █ █ █",
"██ █ ██▄▄ █ █ █ █ ██ █ ▄ █",
"█ █ █ █▄ ▄▀ ▀████ █ █ ▐█ █ █",
"█ █ █ ▀███▀ █ █ ▐ █ ",
"█ ██ █▐ ▀ ",
"",
}
dashboard.section.buttons.val = {
dashboard.button("e", " > New file", ":ene <BAR> startinsert <CR>"),
dashboard.button("f", " > Find file", ":Telescope find_files<CR>"),
dashboard.button("r", " > Recent", ":Telescope oldfiles<CR>"),
dashboard.button("s", " > Settings", ":e $MYVIMRC | :cd %:p:h | split . | wincmd k | pwd<CR>"),
dashboard.button("q", "󰩈 > Quit", ":qa<CR>"),
}
local fortune = require("alpha.fortune")
dashboard.section.footer.val = fortune()
alpha.setup(dashboard.config)
end
}