mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
Use chezmoi for Config entry in snacks dashboard
This commit is contained in:
parent
692bd4a00e
commit
ff84e8900b
1 changed files with 21 additions and 0 deletions
|
|
@ -110,6 +110,27 @@ return {
|
||||||
table.insert(opts.config.center, 5, projects)
|
table.insert(opts.config.center, 5, projects)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"folke/snacks.nvim",
|
||||||
|
optional = true,
|
||||||
|
opts = function(_, opts)
|
||||||
|
local chezmoi_entry = {
|
||||||
|
icon = " ",
|
||||||
|
key = "c",
|
||||||
|
desc = "Config",
|
||||||
|
action = pick_chezmoi,
|
||||||
|
}
|
||||||
|
local config_index
|
||||||
|
for i = #opts.dashboard.preset.keys, 1, -1 do
|
||||||
|
if opts.dashboard.preset.keys[i].key == "c" then
|
||||||
|
table.remove(opts.dashboard.preset.keys, i)
|
||||||
|
config_index = i
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
table.insert(opts.dashboard.preset.keys, config_index, chezmoi_entry)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
-- Filetype icons
|
-- Filetype icons
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue