nvim中dashboard配置
local status, db = pcall(require, "dashboard") if not status then vim.notify("没有找到 dashboard") return end db.setup({ theme = 'hyper', config = { week_header = { enable = true, }, shortcut = { { desc = ' init.lua', group = '@property', action = 'edit ~/.config/nvim/init.lua', key = 'e' }, { icon = ' ', icon_hl = '@variable', desc = 'Files', group = 'Label', action = 'Telescope find_files', key = 'f', }, { desc = ' Projects', group = 'DiagnosticHint', action = 'Telescope projects', key = 'p', }, { desc = ' Oldfiles', group = 'Number', action = 'Telescope oldfiles', key = 'o', }, }, }, })
另外安装目录为~/.local/share/nvim/site/pack/packer/start
但packer会将dashboard.nvim
download to another directory as ~/.local/share/nvim/site/pack/packer/opt
so you should mv dashboard.nvim from /opt to /start then it won't display error when starting