47 lines
1.0 KiB
Lua
47 lines
1.0 KiB
Lua
local alpha = require("alpha")
|
|
local dashboard = require("alpha.themes.dashboard")
|
|
local num_plugins_loaded = require("lazy").stats().loaded
|
|
|
|
dashboard.section.header.val = require("nami.utils.headers")
|
|
|
|
dashboard.section.buttons.val = {
|
|
dashboard.button("i", " New file", "<cmd>enew<CR>i"),
|
|
dashboard.button(
|
|
"o",
|
|
" Recent Files",
|
|
"<cmd>Telescope oldfiles<cr>"
|
|
),
|
|
dashboard.button(
|
|
"e",
|
|
" Explorer",
|
|
"<cmd>Oil<cr>"
|
|
),
|
|
dashboard.button("l", " Lazy", "<cmd>Lazy<cr>"),
|
|
dashboard.button("q", " Quit NVIM", ":qa<CR>"),
|
|
}
|
|
|
|
local footer = {
|
|
type = "text",
|
|
val = { num_plugins_loaded .. " plugins loaded." },
|
|
opts = { position = "center", hl = "Comment" },
|
|
}
|
|
|
|
local section = {
|
|
header = dashboard.section.header,
|
|
buttons = dashboard.section.buttons,
|
|
footer = footer,
|
|
}
|
|
|
|
local opts = {
|
|
layout = {
|
|
{ type = "padding", val = 8 },
|
|
section.header,
|
|
{ type = "padding", val = 2 },
|
|
section.buttons,
|
|
{ type = "padding", val = 1 },
|
|
section.footer,
|
|
},
|
|
}
|
|
|
|
alpha.setup(opts)
|