Nvim: Redesign alpha dashboard

This commit is contained in:
Marko Korhonen 2024-03-19 21:49:21 +02:00
parent 1c47bedc93
commit c2cb934522
Signed by: FunctionalHacker
GPG key ID: A7F78BCB859CD890

View file

@ -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 <BAR> startinsert <CR>"),
dashboard.button("<C-f>", "🔍 Find file", "<cmd>Telescope find_files<cr>"),
dashboard.button("<C-g>", "𑪢 Grep files", "<cmd>Telescope live_grep<cr>"),
dashboard.button("l", "🛋 Lazy", ":Lazy<CR>"),
dashboard.button("m", "📦 Mason", ":Mason<CR>"),
dashboard.button("q", "ꭙ Quit NeoVim", ":qa<CR>"),
}
-- 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,
}