From c2cb934522ffeba7509ee20c2d110e9b3b9feefa Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Tue, 19 Mar 2024 21:49:21 +0200 Subject: [PATCH] Nvim: Redesign alpha dashboard --- home/.config/nvim/lua/plugins/alpha.lua | 28 +++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/home/.config/nvim/lua/plugins/alpha.lua b/home/.config/nvim/lua/plugins/alpha.lua index d92563e..64cb66c 100644 --- a/home/.config/nvim/lua/plugins/alpha.lua +++ b/home/.config/nvim/lua/plugins/alpha.lua @@ -4,7 +4,31 @@ return { "goolord/alpha-nvim", config = function() local alpha = require("alpha") - local theta = require("alpha.themes.theta") - alpha.setup(theta.config) + local dashboard = require("alpha.themes.dashboard") + dashboard.section.header.val = { + [[ __ ]], + [[ ___ ___ ___ __ __ /\_\ ___ ___ ]], + [[ / _ `\ / __`\ / __`\/\ \/\ \\/\ \ / __` __`\ ]], + [[/\ \/\ \/\ __//\ \_\ \ \ \_/ |\ \ \/\ \/\ \/\ \ ]], + [[\ \_\ \_\ \____\ \____/\ \___/ \ \_\ \_\ \_\ \_\]], + [[ \/_/\/_/\/____/\/___/ \/__/ \/_/\/_/\/_/\/_/]], + } + dashboard.section.buttons.val = { + dashboard.button("e", " New file", ":ene startinsert "), + dashboard.button("", "🔍 Find file", "Telescope find_files"), + dashboard.button("", "𑪢 Grep files", "Telescope live_grep"), + dashboard.button("l", "🛋 Lazy", ":Lazy"), + dashboard.button("m", "📦 Mason", ":Mason"), + dashboard.button("q", "ꭙ Quit NeoVim", ":qa"), + } + + -- Fortune in footer + dashboard.section.footer.val = require("alpha.fortune")() + + dashboard.config.opts.noautocmd = true + + vim.cmd([[autocmd User AlphaReady echo 'ready']]) + + alpha.setup(dashboard.config) end, }