48 lines
2.0 KiB
Lua
48 lines
2.0 KiB
Lua
return {
|
|
{
|
|
"goolord/alpha-nvim" ,
|
|
config = function()
|
|
local dashboard = require"alpha.themes.dashboard"
|
|
|
|
local function button(sc, txt, key, key_opts)
|
|
local b = dashboard.button(sc, txt, key, key_opts)
|
|
b.opts.hl_shortcut = "Macro"
|
|
return b
|
|
end
|
|
|
|
local icons = require"user.icons"
|
|
|
|
dashboard.section.header.val = {
|
|
[[ , __ ___ __. _ __ ` , _ , _ ]],
|
|
[[ |' `. .' ` .' \ | / | |' `|' `.]],
|
|
[[ | | |----' | | ` / | | | |]],
|
|
[[ / | `.___, `._.' \/ / / ' /]],
|
|
}
|
|
|
|
dashboard.section.buttons.val = {
|
|
button("f", icons.documents.Files .. " Find file", ":Telescope find_files <CR>"),
|
|
button("e", icons.ui.NewFile .. " New file", ":ene <BAR> startinsert <CR>"),
|
|
button("r", icons.ui.History .. " Recent files", ":Telescope oldfiles <CR>"),
|
|
button("t", icons.ui.List .. " Find text", ":Telescope live_grep <CR>"),
|
|
button("c", icons.ui.Gear .. " Config", ":e ~/.config/nvim/init.lua <CR>"),
|
|
button("u", icons.ui.CloudDownload .. " Update", ":PackerSync<CR>"),
|
|
button("q", icons.ui.SignOut .. " Quit", ":qa<CR>"),
|
|
}
|
|
|
|
dashboard.section.footer.val = {
|
|
[[┬┌┐┌┬┌─┬ ┌─┐┌┬┐┌┐ ┬ ┌─┐┌┬┐┌─┐┌─┐┌┬┐]],
|
|
[[││││├┴┐│ ├┤ │ ├┴┐│ │ │ │ │ │ ││││]],
|
|
[[┴┘└┘┴ ┴┴─┘└─┘ ┴ └─┘┴─┘└─┘ ┴o└─┘└─┘┴ ┴]],
|
|
}
|
|
|
|
dashboard.section.header.opts.hl = "Include"
|
|
dashboard.section.buttons.opts.hl = "Macro"
|
|
dashboard.section.footer.opts.hl = "Type"
|
|
|
|
dashboard.opts.opts.noautocmd = true
|
|
|
|
require"alpha".setup(dashboard.opts)
|
|
end,
|
|
}
|
|
}
|