-
Notifications
You must be signed in to change notification settings - Fork 117
/
alpha-nvim.lua
52 lines (40 loc) · 2.12 KB
/
alpha-nvim.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
-----------------------------------------------------------
-- Dashboard configuration file
-----------------------------------------------------------
-- Plugin: alpha-nvim
-- url: https://github.com/goolord/alpha-nvim
-- For configuration examples see: https://github.com/goolord/alpha-nvim/discussions/16
local status_ok, alpha = pcall(require, 'alpha')
if not status_ok then
return
end
local dashboard = require('alpha.themes.dashboard')
-- Footer
local function footer()
local version = vim.version()
local print_version = "v" .. version.major .. '.' .. version.minor .. '.' .. version.patch
local datetime = os.date('%Y/%m/%d %H:%M:%S')
return print_version .. ' - ' .. datetime
end
-- Banner
local banner = {
" ",
" ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ",
" ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ",
" ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ",
" ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ",
" ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ",
" ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ",
" ",
}
dashboard.section.header.val = banner
-- Menu
dashboard.section.buttons.val = {
dashboard.button('e', ' New file', ':ene <BAR> startinsert<CR>'),
dashboard.button('f', ' Find file', ':NvimTreeOpen<CR>'),
dashboard.button('s', ' Settings', ':e $MYVIMRC<CR>'),
dashboard.button('u', ' Update plugins', ':Lazy update<CR>'),
dashboard.button('q', ' Quit', ':qa<CR>'),
}
dashboard.section.footer.val = footer()
alpha.setup(dashboard.config)