diff options
| author | jdhao <jdhao@hotmail.com> | 2021-10-29 01:48:10 +0800 |
|---|---|---|
| committer | jdhao <jdhao@hotmail.com> | 2021-10-29 01:48:10 +0800 |
| commit | e56595c138e4454b3fba96b38eca64e7f237b413 (patch) | |
| tree | e4583bab3211f7f24d9243e795d8262473a7339e /lua/config | |
| parent | 0aa98524d3ee6898889bc0f956d5fc238807803f (diff) | |
add plugin alpha-nvim
Diffstat (limited to 'lua/config')
| -rw-r--r-- | lua/config/alpha-nvim.lua | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/lua/config/alpha-nvim.lua b/lua/config/alpha-nvim.lua new file mode 100644 index 0000000..a8fd953 --- /dev/null +++ b/lua/config/alpha-nvim.lua @@ -0,0 +1,31 @@ +local alpha = require("alpha") +local dashboard = require("alpha.themes.dashboard") + +-- Set header +dashboard.section.header.val = { + " ", + " ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ", + " ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ", + " ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ", + " ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ", + " ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ", + " ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ", + " ", +} + +-- Set menu +dashboard.section.buttons.val = { + dashboard.button( "Leader f f", " > Find file", ":Leaderf file --popup<CR>"), + dashboard.button( "Leader f r", " > Recent files" , ":Leaderf mru --popup<CR>"), + dashboard.button( "Leader f g", " > Project grep" , ":Leaderf rg --popup<CR>"), + dashboard.button( "e", " > New file" , ":enew <CR>"), + dashboard.button( "q", " > Quit NVIM", ":qa<CR>"), +} + +local fortune = require("alpha.fortune") +dashboard.section.footer.val = fortune() + +alpha.setup(dashboard.opts) + +-- Send config to alpha +alpha.setup(dashboard.opts) |
