aboutsummaryrefslogtreecommitdiff
path: root/lua/config/dashboard-nvim.lua
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2022-08-07 00:01:23 +0800
committerjdhao <jdhao@hotmail.com>2022-08-07 00:01:23 +0800
commit8291b15599e30141c99c6b5bcb677241f8bbe455 (patch)
tree0f2c6dca872d87de10955d0ecf0ed751ced36f8f /lua/config/dashboard-nvim.lua
parent3de31f7d0a4a45d480b80425a2c8b5037a6f7e8e (diff)
remove alpha-nvim, use dashboard-nvim
Diffstat (limited to 'lua/config/dashboard-nvim.lua')
-rw-r--r--lua/config/dashboard-nvim.lua65
1 files changed, 65 insertions, 0 deletions
diff --git a/lua/config/dashboard-nvim.lua b/lua/config/dashboard-nvim.lua
new file mode 100644
index 0000000..45056c0
--- /dev/null
+++ b/lua/config/dashboard-nvim.lua
@@ -0,0 +1,65 @@
+local dashboard = require("dashboard")
+
+dashboard.custom_header = {
+ " ",
+ " ",
+ " ",
+ " ███╗ ██╗ ███████╗ ██████╗ ██╗ ██╗ ██╗ ███╗ ███╗",
+ " ████╗ ██║ ██╔════╝██╔═══██╗ ██║ ██║ ██║ ████╗ ████║",
+ " ██╔██╗ ██║ █████╗ ██║ ██║ ██║ ██║ ██║ ██╔████╔██║",
+ " ██║╚██╗██║ ██╔══╝ ██║ ██║ ╚██╗ ██╔╝ ██║ ██║╚██╔╝██║",
+ " ██║ ╚████║ ███████╗╚██████╔╝ ╚████╔╝ ██║ ██║ ╚═╝ ██║",
+ " ╚═╝ ╚═══╝ ╚══════╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝",
+ " ",
+ " ",
+ " ",
+ " ",
+}
+
+dashboard.custom_center = {
+ {
+ icon = " ",
+ desc = "Find File ",
+ action = "Leaderf file --popup",
+ shortcut = "<Leader> f f",
+ },
+ {
+ icon = " ",
+ desc = "Recently opened files ",
+ action = "Leaderf mru --popup",
+ shortcut = "<Leader> f r",
+ },
+ {
+ icon = " ",
+ desc = "Project grep ",
+ action = "Leaderf rg --popup",
+ shortcut = "<Leader> f g",
+ },
+ {
+ icon = " ",
+ desc = "Open Nvim config ",
+ action = "tabnew $MYVIMRC | tcd %:p:h",
+ shortcut = "<Leader> e v",
+ },
+ {
+ icon = " ",
+ desc = "New file ",
+ action = "enew",
+ shortcut = "e ",
+ },
+ {
+ icon = " ",
+ desc = "Quit Nvim ",
+ -- desc = "Quit Nvim ",
+ action = "qa",
+ shortcut = "q "
+ }
+}
+
+vim.cmd([[
+ augroup dashboard_enter
+ au!
+ autocmd FileType dashboard nnoremap q :qa<CR>
+ autocmd FileType dashboard nnoremap e :enew<CR>
+ augroup END
+]])