return { { "RileyGabrielson/inspire.nvim", config = function() require("inspire").setup({ mode = "random", }) end, }, { "nvimdev/dashboard-nvim", lazy = false, -- As https://github.com/nvimdev/dashboard-nvim/pull/450, dashboard-nvim shouldn't be lazy-loaded to properly handle stdin. opts = function() -- local logo = [[ -- ▐ ▄ ▄▄▄ . ▌ ▐·▪ • ▌ ▄ ·. -- •█▌▐█▀▄.▀·▪ ▪█·█▌██ ·██ ▐███▪ -- ▐█▐▐▌▐▀▀▪▄ ▄█▀▄ ▐█▐█•▐█·▐█ ▌▐▌▐█· -- ██▐█▌▐█▄▄▌▐█▌.▐▌ ███ ▐█▌██ ██▌▐█▌ -- ▀▀ █▪ ▀▀▀ ▀█▄▀▪. ▀ ▀▀▀▀▀ █▪▀▀▀ -- ]] local logo = [[  ████ ██████ █████ ██ ███████████ █████  █████████ ███████████████████ ███ ███████████ █████████ ███ █████████████ █████ ██████████████ █████████ ██████████ █████████ █████ █████ ████ █████ ███████████ ███ ███ █████████ █████ █████ ████ █████ ██████ █████████████████████ ████ █████ █████ ████ ██████ ]] local inspire = require("inspire") local quote = inspire.get_quote() local centered_quote_lines = inspire.center_text(quote.text, quote.author, 52, 8, 52) -- Convert the table of lines to a single string with newlines local centered_quote_str = table.concat(centered_quote_lines, "\n") logo = string.rep("\n", 8) .. logo .. "\n\n" .. centered_quote_str .. "\n\n" local opts = { theme = "doom", hide = { statusline = false, }, config = { header = vim.split(logo, "\n"), center = { { action = function() require("telescope.builtin").find_files() end, desc = " Find File", icon = " ", key = "f", }, { action = "ene | startinsert", desc = " New File", icon = " ", key = "n", }, { action = function() require("telescope.builtin").oldfiles() end, desc = " Recent Files", icon = " ", key = "r", }, { action = function() require("telescope.builtin").live_grep() end, desc = " Find Text", icon = "󱄽 ", key = "w", }, { action = function() require("telescope.builtin").find_files({ cwd = vim.fn.stdpath("config") }) end, desc = " Search Neovim files", icon = " ", key = "c", }, { action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s", }, -- { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" }, { action = "Lazy", desc = " Lazy", icon = "󰒲 ", key = "l" }, { action = function() vim.api.nvim_input("qa") end, desc = " Quit", icon = "󰅘 ", key = "q", }, }, footer = function() local stats = require("lazy").stats() local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100) return { "⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms", } end, }, } for _, button in ipairs(opts.config.center) do button.desc = button.desc .. string.rep(" ", 43 - #button.desc) button.key_format = " %s" end -- open dashboard after closing lazy if vim.o.filetype == "lazy" then vim.api.nvim_create_autocmd("WinClosed", { pattern = tostring(vim.api.nvim_get_current_win()), once = true, callback = function() vim.schedule(function() vim.api.nvim_exec_autocmds("UIEnter", { group = "dashboard" }) end) end, }) end return opts end, dependencies = { { "folke/persistence.nvim", event = "BufReadPre", opts = {}, -- stylua: ignore keys = { -- { "qs", function() require("persistence").load() end, desc = "Restore Session" }, -- { "ql", function() require("persistence").load({ last = true }) end, desc = "Restore Last Session" }, -- { "qd", function() require("persistence").stop() end, desc = "Don't Save Current Session" }, { "db", ":Dashboard", desc = "Dashboard"}, { "dq", function() require("inspire").show_quote() end, desc = "Show Inspire Quote"}, }, }, }, }, }