marleyvim/nvim/lua/plugins/ui/dashboard-nvim.lua
punkfairie 11c520863a
feat: Dashboard.nvim
Might switch to alpha tho
2024-11-30 11:08:18 -08:00

60 lines
2.3 KiB
Lua

return {
'dashboard-nvim',
event = 'VimEnter',
before = function()
require('lz.n').trigger_load('mini.icons')
end,
after = function()
local icons = require('icons').dashboard
local title = [[
███╗ ███╗ █████╗ ██████╗ ██╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗
████╗ ████║██╔══██╗██╔══██╗██║ ██╔════╝╚██╗ ██╔╝██║ ██║██║████╗ ████║
██╔████╔██║███████║██████╔╝██║ █████╗ ╚████╔╝ ██║ ██║██║██╔████╔██║
██║╚██╔╝██║██╔══██║██╔══██╗██║ ██╔══╝ ╚██╔╝ ╚██╗ ██╔╝██║██║╚██╔╝██║
██║ ╚═╝ ██║██║ ██║██║ ██║███████╗███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║
╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝
]]
title = string.rep('\n', 8) .. title .. '\n\n'
require('dashboard').setup({
theme = 'hyper',
shortcut_type = 'number',
change_to_vcs_root = true,
hide = {
-- This is taken care of by Lualine.
statusline = false,
tabline = true,
},
config = {
header = vim.split(title, '\n'),
shortcut = {
{
icon = icons.quit .. ' ',
desc = 'Quit',
key = 'q',
action = function()
vim.api.nvim_input('<CMD>qa<CR>')
end,
},
},
mru = {
enable = true,
limit = 5,
icon = icons.mru .. ' ',
label = 'Files',
},
project = {
enable = true,
limit = 5,
icon = icons.project .. ' ',
label = 'Projects',
},
},
})
end,
}