local M = { "goolord/alpha-nvim", event = "VimEnter", } function M.config() local dashboard = require "alpha.themes.dashboard" local icons = require "user.icons" local function button(sc, txt, keybind, keybind_opts) local b = dashboard.button(sc, txt, keybind, keybind_opts) b.opts.hl_shortcut = "Include" return b end dashboard.section.header.val = { [[ __ ]], [[ ___ ___ ___ __ __ /\_\ ___ ___ ]], [[ / _ `\ / __`\ / __`\/\ \/\ \\/\ \ / __` __`\ ]], [[/\ \/\ \/\ __//\ \_\ \ \ \_/ |\ \ \/\ \/\ \/\ \ ]], [[\ \_\ \_\ \____\ \____/\ \___/ \ \_\ \_\ \_\ \_\]], [[ \/_/\/_/\/____/\/___/ \/__/ \/_/\/_/\/_/\/_/]], } dashboard.section.header.val = { [[πŸ›Έγ€€γ€€γ€€ γ€€πŸŒŽγ€€Β°γ€€γ€€πŸŒ“γ€€β€’γ€€γ€€.Β°β€’γ€€γ€€γ€€πŸš€ ✯ ]], [[γ€€γ€€γ€€β˜…γ€€*γ€€γ€€γ€€γ€€γ€€Β°γ€€γ€€γ€€γ€€πŸ›°  °· πŸͺ ]], [[.γ€€γ€€γ€€β€’γ€€Β° β˜…γ€€β€’ β˜„ ]], [[ ▁▂▃▄▅▆▇▇▆▅▄▃▂▁. ]], } dashboard.section.header.val = { [[ β˜…γ€€βœ― πŸ›Έ πŸͺ .Β°β€’ | ]], [[ __ Β° β˜…γ€€β€’ πŸ›° __ / \ ]], [[ / / ____ ___ ______ _____/ /_ | O | ]], [[ / / / __ `/ / / / __ \/ ___/ __ \ | O | ]], [[ / /___/ /_/ / /_/ / / / / /__/ / / / /| | |\ ]], [[/_____/\__,_/\__,_/_/ /_/\___/_/ /_/ /_(.|.)_\]], } dashboard.section.buttons.val = { button("f", icons.ui.Files .. " Find file", ":Telescope find_files "), button("n", icons.ui.NewFile .. " New file", ":ene startinsert "), -- button("s", icons.ui.SignIn .. " Load session", ":lua require('persistence').load()"), button("p", icons.git.Repo .. " Find project", ":lua require('telescope').extensions.projects.projects()"), button("r", icons.ui.History .. " Recent files", ":Telescope oldfiles "), button("t", icons.ui.Text .. " Find text", ":Telescope live_grep "), button("c", icons.ui.Gear .. " Config", ":e ~/.config/nvim/init.lua "), button("q", icons.ui.SignOut .. " Quit", ":qa"), } local function footer() return "chrisatmachine.com" end dashboard.section.footer.val = footer() dashboard.section.header.opts.hl = "Keyword" dashboard.section.buttons.opts.hl = "Include" dashboard.section.footer.opts.hl = "Type" dashboard.opts.opts.noautocmd = true require("alpha").setup(dashboard.opts) vim.api.nvim_create_autocmd("User", { pattern = "LazyVimStarted", callback = function() local stats = require("lazy").stats() local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100) dashboard.section.footer.val = "Loaded " .. stats.count .. " plugins in " .. ms .. "ms" pcall(vim.cmd.AlphaRedraw) end, }) vim.api.nvim_create_autocmd({ "User" }, { pattern = { "AlphaReady" }, callback = function() vim.cmd [[ set laststatus=0 | autocmd BufUnload set laststatus=3 ]] end, }) end return M