Skip to content

Commit e859434

Browse files
chore(build): auto-generate docs
1 parent 8249f7c commit e859434

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

docs/extras/util/chezmoi.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ opts = {
7878
```lua
7979
{
8080
"xvzc/chezmoi.nvim",
81+
cmd = { "ChezmoiEdit" },
8182
keys = {
8283
{
8384
"<leader>sz",
@@ -237,4 +238,63 @@ end
237238

238239
</Tabs>
239240

241+
## [snacks.nvim](https://github.com/folke/snacks.nvim) _(optional)_
242+
243+
<Tabs>
244+
245+
<TabItem value="opts" label="Options">
246+
247+
```lua
248+
opts = function(_, opts)
249+
local chezmoi_entry = {
250+
icon = "",
251+
key = "c",
252+
desc = "Config",
253+
action = pick_chezmoi,
254+
}
255+
local config_index
256+
for i = #opts.dashboard.preset.keys, 1, -1 do
257+
if opts.dashboard.preset.keys[i].key == "c" then
258+
table.remove(opts.dashboard.preset.keys, i)
259+
config_index = i
260+
break
261+
end
262+
end
263+
table.insert(opts.dashboard.preset.keys, config_index, chezmoi_entry)
264+
end
265+
```
266+
267+
</TabItem>
268+
269+
270+
<TabItem value="code" label="Full Spec">
271+
272+
```lua
273+
{
274+
"folke/snacks.nvim",
275+
optional = true,
276+
opts = function(_, opts)
277+
local chezmoi_entry = {
278+
icon = "",
279+
key = "c",
280+
desc = "Config",
281+
action = pick_chezmoi,
282+
}
283+
local config_index
284+
for i = #opts.dashboard.preset.keys, 1, -1 do
285+
if opts.dashboard.preset.keys[i].key == "c" then
286+
table.remove(opts.dashboard.preset.keys, i)
287+
config_index = i
288+
break
289+
end
290+
end
291+
table.insert(opts.dashboard.preset.keys, config_index, chezmoi_entry)
292+
end,
293+
}
294+
```
295+
296+
</TabItem>
297+
298+
</Tabs>
299+
240300
<!-- plugins:end -->

0 commit comments

Comments
 (0)