docs: docgen

This commit is contained in:
Folke Lemaitre 2025-02-18 22:54:32 +01:00
parent 1adfd29af3
commit 3bfaffdd23
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
8 changed files with 125 additions and 29 deletions

View file

@ -29,6 +29,20 @@ What this does:
## 📚 Types
```lua
---@class snacks.debug.cmd
---@field cmd string|string[]
---@field level? snacks.notifier.level
---@field title? string
---@field args? string[]
---@field cwd? string
---@field group? boolean
---@field notify? boolean
---@field footer? string
---@field header? string
---@field props? table<string, string>
```
```lua
---@alias snacks.debug.Trace {name: string, time: number, [number]:snacks.debug.Trace}
---@alias snacks.debug.Stat {name:string, time:number, count?:number, depth?:number}
@ -56,7 +70,7 @@ Snacks.debug.backtrace(msg, opts)
### `Snacks.debug.cmd()`
```lua
---@param opts {cmd: string|string[], args?: string[], cwd?: string, group?: boolean, notify?: boolean}
---@param opts snacks.debug.cmd
Snacks.debug.cmd(opts)
```

View file

@ -130,6 +130,7 @@ In case of issues, make sure to run `:checkhealth snacks`.
env = {},
---@class snacks.image.convert.Config
convert = {
notify = true, -- show a notification on error
---@type snacks.image.args
mermaid = function()
local theme = vim.o.background == "light" and "neutral" or "dark"