fix(snacks): cleaner way to adjust keys preset

This commit is contained in:
Folke Lemaitre
2024-11-19 07:31:28 +01:00
parent 0bb1da6d57
commit 9c31004365
2 changed files with 29 additions and 11 deletions

View File

@ -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,
},
}