fix(snacks): cleaner way to adjust keys preset
This commit is contained in:
@ -152,6 +152,9 @@ return {
|
||||
"nvimdev/dashboard-nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
if not vim.tbl_get(opts, "config", "center") then
|
||||
return
|
||||
end
|
||||
local projects = {
|
||||
action = pick,
|
||||
desc = " Projects",
|
||||
@ -165,4 +168,17 @@ return {
|
||||
table.insert(opts.config.center, 3, projects)
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"folke/snacks.nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.dashboard.preset.keys, 3, {
|
||||
action = pick,
|
||||
desc = "Projects",
|
||||
icon = " ",
|
||||
key = "p",
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user