From a3cd5b8ad6c1ecaa82255e2c3fe48a2661b37637 Mon Sep 17 00:00:00 2001 From: Henry Denny Date: Thu, 21 Mar 2024 15:09:52 +0000 Subject: [PATCH] Add dashboard. --- lua/custom/plugins/dashboard.lua | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 lua/custom/plugins/dashboard.lua diff --git a/lua/custom/plugins/dashboard.lua b/lua/custom/plugins/dashboard.lua new file mode 100644 index 00000000..bead07a4 --- /dev/null +++ b/lua/custom/plugins/dashboard.lua @@ -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 startinsert "), + dashboard.button("f", " > Find file", ":Telescope find_files"), + dashboard.button("r", " > Recent", ":Telescope oldfiles"), + dashboard.button("s", " > Settings", ":e $MYVIMRC | :cd %:p:h | split . | wincmd k | pwd"), + dashboard.button("q", "󰩈 > Quit", ":qa"), + } + local fortune = require("alpha.fortune") + dashboard.section.footer.val = fortune() + alpha.setup(dashboard.config) + end +}