aboutsummaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2023-05-22 20:49:29 +0200
committerjdhao <jdhao@hotmail.com>2023-05-22 20:50:15 +0200
commit9ca65fd94207bfa87219710a9c9cd094e682abbc (patch)
tree9211a429f73b2da12cf3a84b7e5f58886a7c72f5 /lua
parentcc3a7d6ebde5450a5876e6793ef93577853891fd (diff)
update conf for nvim-dashboard
Diffstat (limited to 'lua')
-rw-r--r--lua/config/dashboard-nvim.lua23
-rw-r--r--lua/plugins.lua2
2 files changed, 16 insertions, 9 deletions
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 = "<Leader> f f",
+ key = "<Leader> f f",
},
{
icon = " ",
desc = "Recently opened files ",
action = "Leaderf mru --popup",
- shortcut = "<Leader> f r",
+ key = "<Leader> f r",
},
{
icon = " ",
desc = "Project grep ",
action = "Leaderf rg --popup",
- shortcut = "<Leader> f g",
+ key = "<Leader> f g",
},
{
icon = " ",
desc = "Open Nvim config ",
action = "tabnew $MYVIMRC | tcd %:p:h",
- shortcut = "<Leader> e v",
+ key = "<Leader> 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 }),
diff --git a/lua/plugins.lua b/lua/plugins.lua
index 54743f8..7c8a0a8 100644
--- a/lua/plugins.lua
+++ b/lua/plugins.lua
@@ -148,7 +148,7 @@ packer.startup {
config = [[require('config.bufferline')]] }
-- fancy start screen
- use { "glepnir/dashboard-nvim", event = "VimEnter",
+ use { "nvimdev/dashboard-nvim", event = "VimEnter",
cond = firenvim_not_active,
config = [[require('config.dashboard-nvim')]]
}