nvim-config/lua/configs/alpha.lua

25 lines
700 B
Lua
Raw Normal View History

2022-10-03 16:39:31 +00:00
local M = {}
function M.config()
2023-01-10 18:21:09 +00:00
local status_ok, alpha = pcall(require, 'alpha')
2022-10-03 16:39:31 +00:00
if not status_ok then
return
end
2023-01-10 18:21:09 +00:00
local dashboard = require('alpha.themes.dashboard')
2022-10-03 16:39:31 +00:00
2023-01-10 18:21:09 +00:00
dashboard.section.header.val = { 'NeoVim' }
dashboard.section.buttons.val = {
dashboard.button('f', 'Find File', ':Telescope find_files<cr>'),
dashboard.button('w', 'Find Word', ':Telescope live_grep<cr>'),
dashboard.button('o', 'Recent Files', ':Telescope oldfiles<cr>'),
dashboard.button('e', 'Open Tree', ':NvimTreeToggle<cr>'),
dashboard.button('s', 'Load Session', ':SessionManager load_current_dir_session<cr>'),
dashboard.button('q', 'Quit', ':qa<cr>'),
}
2022-10-03 16:39:31 +00:00
2023-01-10 18:21:09 +00:00
alpha.setup(dashboard.config)
2022-10-03 16:39:31 +00:00
end
return M