1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

update conf for nvim-dashboard

This commit is contained in:
jdhao 2023-05-22 20:49:29 +02:00
parent cc3a7d6ebd
commit 9ca65fd942
2 changed files with 16 additions and 9 deletions

View File

@ -2,7 +2,8 @@ local api = vim.api
local keymap = vim.keymap local keymap = vim.keymap
local dashboard = require("dashboard") local dashboard = require("dashboard")
dashboard.custom_header = { conf = {}
conf.header = {
" ", " ",
" ", " ",
" ", " ",
@ -18,46 +19,52 @@ dashboard.custom_header = {
" ", " ",
} }
dashboard.custom_center = { conf.center = {
{ {
icon = "", icon = "",
desc = "Find File ", desc = "Find File ",
action = "Leaderf file --popup", action = "Leaderf file --popup",
shortcut = "<Leader> f f", key = "<Leader> f f",
}, },
{ {
icon = "", icon = "",
desc = "Recently opened files ", desc = "Recently opened files ",
action = "Leaderf mru --popup", action = "Leaderf mru --popup",
shortcut = "<Leader> f r", key = "<Leader> f r",
}, },
{ {
icon = "", icon = "",
desc = "Project grep ", desc = "Project grep ",
action = "Leaderf rg --popup", action = "Leaderf rg --popup",
shortcut = "<Leader> f g", key = "<Leader> f g",
}, },
{ {
icon = "", icon = "",
desc = "Open Nvim config ", desc = "Open Nvim config ",
action = "tabnew $MYVIMRC | tcd %:p:h", action = "tabnew $MYVIMRC | tcd %:p:h",
shortcut = "<Leader> e v", key = "<Leader> e v",
}, },
{ {
icon = "", icon = "",
desc = "New file ", desc = "New file ",
action = "enew", action = "enew",
shortcut = "e ", key = "e",
}, },
{ {
icon = "", icon = "",
desc = "Quit Nvim ", desc = "Quit Nvim ",
-- desc = "Quit Nvim ", -- desc = "Quit Nvim ",
action = "qa", action = "qa",
shortcut = "q ", key = "q",
}, },
} }
dashboard.setup({
theme = 'doom',
shortcut_type = 'number',
config = conf
})
api.nvim_create_autocmd("FileType", { api.nvim_create_autocmd("FileType", {
pattern = "dashboard", pattern = "dashboard",
group = api.nvim_create_augroup("dashboard_enter", { clear = true }), group = api.nvim_create_augroup("dashboard_enter", { clear = true }),

View File

@ -148,7 +148,7 @@ packer.startup {
config = [[require('config.bufferline')]] } config = [[require('config.bufferline')]] }
-- fancy start screen -- fancy start screen
use { "glepnir/dashboard-nvim", event = "VimEnter", use { "nvimdev/dashboard-nvim", event = "VimEnter",
cond = firenvim_not_active, cond = firenvim_not_active,
config = [[require('config.dashboard-nvim')]] config = [[require('config.dashboard-nvim')]]
} }