From 8291b15599e30141c99c6b5bcb677241f8bbe455 Mon Sep 17 00:00:00 2001 From: jdhao Date: Sun, 7 Aug 2022 00:01:23 +0800 Subject: remove alpha-nvim, use dashboard-nvim --- lua/config/dashboard-nvim.lua | 65 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 lua/config/dashboard-nvim.lua (limited to 'lua/config/dashboard-nvim.lua') 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 = " f f", + }, + { + icon = " ", + desc = "Recently opened files ", + action = "Leaderf mru --popup", + shortcut = " f r", + }, + { + icon = " ", + desc = "Project grep ", + action = "Leaderf rg --popup", + shortcut = " f g", + }, + { + icon = " ", + desc = "Open Nvim config ", + action = "tabnew $MYVIMRC | tcd %:p:h", + shortcut = " 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 + autocmd FileType dashboard nnoremap e :enew + augroup END +]]) -- cgit v1.2.3