From 9ca65fd94207bfa87219710a9c9cd094e682abbc Mon Sep 17 00:00:00 2001 From: jdhao Date: Mon, 22 May 2023 20:49:29 +0200 Subject: update conf for nvim-dashboard --- lua/config/dashboard-nvim.lua | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'lua/config') diff --git a/lua/config/dashboard-nvim.lua b/lua/config/dashboard-nvim.lua index 7bcf1ff..2519aec 100644 --- a/lua/config/dashboard-nvim.lua +++ b/lua/config/dashboard-nvim.lua @@ -2,7 +2,8 @@ local api = vim.api local keymap = vim.keymap local dashboard = require("dashboard") -dashboard.custom_header = { +conf = {} +conf.header = { " ", " ", " ", @@ -18,46 +19,52 @@ dashboard.custom_header = { " ", } -dashboard.custom_center = { +conf.center = { { icon = " ", desc = "Find File ", action = "Leaderf file --popup", - shortcut = " f f", + key = " f f", }, { icon = " ", desc = "Recently opened files ", action = "Leaderf mru --popup", - shortcut = " f r", + key = " f r", }, { icon = " ", desc = "Project grep ", action = "Leaderf rg --popup", - shortcut = " f g", + key = " f g", }, { icon = " ", desc = "Open Nvim config ", action = "tabnew $MYVIMRC | tcd %:p:h", - shortcut = " e v", + key = " e v", }, { icon = " ", desc = "New file ", action = "enew", - shortcut = "e ", + key = "e", }, { icon = " ", desc = "Quit Nvim ", -- desc = "Quit Nvim ", action = "qa", - shortcut = "q ", + key = "q", }, } +dashboard.setup({ + theme = 'doom', + shortcut_type = 'number', + config = conf +}) + api.nvim_create_autocmd("FileType", { pattern = "dashboard", group = api.nvim_create_augroup("dashboard_enter", { clear = true }), -- cgit v1.2.3