diff --git a/lua/config/alpha-nvim.lua b/lua/config/alpha-nvim.lua deleted file mode 100644 index 521bce9..0000000 --- a/lua/config/alpha-nvim.lua +++ /dev/null @@ -1,32 +0,0 @@ -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"), - dashboard.button( "Leader f r", " > Recent files" , ":Leaderf mru --popup"), - dashboard.button( "Leader f g", " > Project grep" , ":Leaderf rg --popup"), - dashboard.button( "u", " > Update plugins" , ":PackerSync"), - dashboard.button( "e", " > New file" , ":enew "), - dashboard.button( "q", " > Quit NVIM", ":qa"), -} - -local fortune = require("alpha.fortune") -dashboard.section.footer.val = fortune() - -alpha.setup(dashboard.opts) - --- Send config to alpha -alpha.setup(dashboard.opts) 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 +]]) diff --git a/lua/plugins.lua b/lua/plugins.lua index a12b655..209abf6 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -139,7 +139,7 @@ packer.startup({ use({ "akinsho/bufferline.nvim", event = "VimEnter", config = [[require('config.bufferline')]] }) -- fancy start screen - -- use { 'goolord/alpha-nvim', event = 'VimEnter', config = [[require('config.alpha-nvim')]] } + use { 'glepnir/dashboard-nvim', config = [[require('config.dashboard-nvim')]] } use({ "lukas-reineke/indent-blankline.nvim",