Files
nvim/lua/plugins/alpha-nvim.lua
Norm Rasmussen 1f66ee24e0 First Commit
2022-03-03 13:52:43 -05:00

49 lines
2.1 KiB
Lua

-----------------------------------------------------------
-- Dashboard configuration file
-----------------------------------------------------------
-- Plugin: alpha-nvim
-- url: https://github.com/goolord/alpha-nvim
-- For configuration examples see: https://github.com/goolord/alpha-nvim/discussions/16
local alpha = require 'alpha'
local dashboard = require 'alpha.themes.dashboard'
-- Footer
local function footer()
local version = vim.version()
local print_version = "v" .. version.major .. '.' .. version.minor .. '.' .. version.patch
local datetime = os.date('%Y/%m/%d %H:%M:%S')
return print_version .. ' ' .. datetime
end
-- Banner
local banner = {
" ",
" ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ",
" ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ",
" ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ",
" ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ",
" ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ",
" ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ",
" ",
}
dashboard.section.header.val = banner
-- Menu
dashboard.section.buttons.val = {
dashboard.button('e', ' New file', ':ene <BAR> startinsert<CR>'),
dashboard.button('f', ' Find file', ':NvimTreeOpen<CR>'),
dashboard.button('s', ' Settings', ':e $MYVIMRC<CR>'),
dashboard.button('u', ' Update plugins', ':PackerUpdate<CR>'),
dashboard.button('q', ' Quit', ':qa<CR>'),
}
dashboard.section.footer.val = footer()
alpha.setup(dashboard.config)