feat: dashboard.nvim

Might switch to alpha tho
This commit is contained in:
punkfairie 2024-11-29 21:33:19 -08:00
parent 75a8915db4
commit bb0181bd7a
Signed by: punkfairie
GPG key ID: A509E8F77FB9D696
4 changed files with 67 additions and 0 deletions

View file

@ -35,6 +35,7 @@ with final.pkgs.lib; let
# UI
mini-icons
dashboard-nvim
bufferline-nvim
];

View file

@ -5,4 +5,9 @@ return {
Hint = '',
Info = '',
},
dashboard = {
quit = '',
mru = '',
project = '',
},
}

View file

@ -0,0 +1,60 @@
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,
}

View file

@ -2,5 +2,6 @@ local req = require('lib.marleyvim').localRequire('plugins.ui')
return {
req('bufferline-nvim'),
req('dashboard-nvim'),
req('mini-icons'),
}