marleyvim/nvim/lua/plugins/ui/alpha-nvim.lua

54 lines
2.2 KiB
Lua
Raw Normal View History

2024-11-30 11:08:42 -08:00
return {
'alpha-nvim',
before = function()
require('lz.n').trigger_load('plenary.nvim')
require('lz.n').trigger_load('mini.icons')
end,
after = function()
local theta = require('alpha.themes.theta')
local header = [[
]]
theta.header.val = vim.split(header, '\n')
local button = require('alpha.themes.dashboard').button
theta.buttons.val = {
{
type = 'text',
val = 'Shortcuts',
opts = { hl = 'SpecialComment', position = 'center' },
},
{ type = 'padding', val = 1 },
button(
'f',
'󰈞 Find file',
'<CMD>lua require("telescope").builtin.fd()<CR>'
),
button(
'g',
' Live grep',
'<CMD>lua require("telescope").builtin.live_grep()<CR>'
),
button(
's',
' Restore session',
2024-11-30 18:10:09 -08:00
'<CMD>lua require("lz.n").trigger_load("persistence.nvim"); require("persistence").load()<CR>'
2024-11-30 11:08:42 -08:00
),
button('q', ' Quit', '<CMD>qa<CR>'),
}
require('alpha').setup(theta.config)
end,
}