fix: nvim 无参数启动报错
- dashboard-nvim 从 opts 改为 config = function() 显式 setup - opts 方式 lazy.nvim 不一定能正确传递给 dashboard 的 setup
This commit is contained in:
+26
-24
@@ -176,32 +176,34 @@ return {
|
|||||||
-- ─────────────────────────────────────────────
|
-- ─────────────────────────────────────────────
|
||||||
{
|
{
|
||||||
"nvimdev/dashboard-nvim",
|
"nvimdev/dashboard-nvim",
|
||||||
lazy = false, -- 🔧 修复:必须立即加载才能在启动时显示
|
lazy = false,
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
opts = {
|
config = function()
|
||||||
theme = "doom",
|
require("dashboard").setup({
|
||||||
config = {
|
theme = "doom",
|
||||||
header = {
|
config = {
|
||||||
"",
|
header = {
|
||||||
" ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗ ██╗██╗███╗ ███╗",
|
"",
|
||||||
" ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║ ██║██║████╗ ████║",
|
" ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗ ██╗██╗███╗ ███╗",
|
||||||
" ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║ ██║██║██╔████╔██║",
|
" ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║ ██║██║████╗ ████║",
|
||||||
" ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝╚██╗ ██╔╝██║██║╚██╔╝██║",
|
" ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║ ██║██║██╔████╔██║",
|
||||||
" ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║",
|
" ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝╚██╗ ██╔╝██║██║╚██╔╝██║",
|
||||||
" ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═══╝ ╚═╝╚═╝ ╚═╝",
|
" ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║",
|
||||||
"",
|
" ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═══╝ ╚═╝╚═╝ ╚═╝",
|
||||||
|
"",
|
||||||
|
},
|
||||||
|
center = {
|
||||||
|
{ icon = " ", key = "f", desc = "查找文件", action = "Telescope find_files" },
|
||||||
|
{ icon = " ", key = "r", desc = "最近文件", action = "Telescope oldfiles" },
|
||||||
|
{ icon = " ", key = "g", desc = "全局搜索", action = "Telescope live_grep" },
|
||||||
|
{ icon = " ", key = "l", desc = "插件管理", action = "Lazy" },
|
||||||
|
{ icon = " ", key = "m", desc = "LSP 管理", action = "Mason" },
|
||||||
|
{ icon = " ", key = "q", desc = "退出", action = "qa" },
|
||||||
|
},
|
||||||
|
footer = { " atdunbg · Neovim" },
|
||||||
},
|
},
|
||||||
center = {
|
})
|
||||||
{ icon = " ", key = "f", desc = "查找文件", action = "Telescope find_files" },
|
end,
|
||||||
{ icon = " ", key = "r", desc = "最近文件", action = "Telescope oldfiles" },
|
|
||||||
{ icon = " ", key = "g", desc = "全局搜索", action = "Telescope live_grep" },
|
|
||||||
{ icon = " ", key = "l", desc = "插件管理", action = "Lazy" },
|
|
||||||
{ icon = " ", key = "m", desc = "LSP 管理", action = "Mason" },
|
|
||||||
{ icon = " ", key = "q", desc = "退出", action = "qa" },
|
|
||||||
},
|
|
||||||
footer = { " atdunbg · Neovim" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
|
||||||
-- ─────────────────────────────────────────────
|
-- ─────────────────────────────────────────────
|
||||||
|
|||||||
Reference in New Issue
Block a user