mirror of
https://github.com/folke/snacks.nvim
synced 2025-07-07 21:25:11 +00:00
chore(build): auto-generate docs
This commit is contained in:
parent
e2cb9df7d0
commit
bd0f46be9a
2 changed files with 29 additions and 19 deletions
|
@ -619,6 +619,23 @@ Snacks.picker.pick({source = "files", ...})
|
|||
---@field expr string
|
||||
```
|
||||
|
||||
```lua
|
||||
---@alias snacks.Picker.ref (fun():snacks.Picker?)|{value?: snacks.Picker}
|
||||
```
|
||||
|
||||
```lua
|
||||
---@class snacks.picker.Last
|
||||
---@field cursor number
|
||||
---@field topline number
|
||||
---@field opts? snacks.picker.Config
|
||||
---@field selected snacks.picker.Item[]
|
||||
---@field filter snacks.picker.Filter
|
||||
```
|
||||
|
||||
```lua
|
||||
---@alias snacks.picker.history.Record {pattern: string, search: string, live?: boolean}
|
||||
```
|
||||
|
||||
```lua
|
||||
---@alias snacks.picker.Extmark vim.api.keyset.set_extmark|{col:number, row?:number, field?:string}
|
||||
---@alias snacks.picker.Text {[1]:string, [2]:string?, virtual?:boolean, field?:string}
|
||||
|
@ -697,23 +714,6 @@ It's a previewer that shows a preview based on the item data.
|
|||
---@field preview? snacks.win.Config|{} preview window config
|
||||
```
|
||||
|
||||
```lua
|
||||
---@alias snacks.Picker.ref (fun():snacks.Picker?)|{value?: snacks.Picker}
|
||||
```
|
||||
|
||||
```lua
|
||||
---@class snacks.picker.Last
|
||||
---@field cursor number
|
||||
---@field topline number
|
||||
---@field opts? snacks.picker.Config
|
||||
---@field selected snacks.picker.Item[]
|
||||
---@field filter snacks.picker.Filter
|
||||
```
|
||||
|
||||
```lua
|
||||
---@alias snacks.picker.history.Record {pattern: string, search: string, live?: boolean}
|
||||
```
|
||||
|
||||
## 📦 Module
|
||||
|
||||
```lua
|
||||
|
@ -2729,8 +2729,6 @@ Snacks.picker.actions.toggle_preview(picker)
|
|||
Snacks.picker.actions.yank(picker, item, action)
|
||||
```
|
||||
|
||||
|
||||
|
||||
## 📦 `snacks.picker.core.picker`
|
||||
|
||||
```lua
|
||||
|
@ -2985,3 +2983,5 @@ Get the word under the cursor or the current visual selection
|
|||
```lua
|
||||
picker:word()
|
||||
```
|
||||
|
||||
|
||||
|
|
10
docs/util.md
10
docs/util.md
|
@ -65,6 +65,16 @@ Encodes a string to be used as a file name.
|
|||
Snacks.util.file_encode(str)
|
||||
```
|
||||
|
||||
### `Snacks.util.get_lang()`
|
||||
|
||||
```lua
|
||||
---@param lang string|number|nil
|
||||
---@overload fun(buf:number):string?
|
||||
---@overload fun(ft:string):string?
|
||||
---@return string?
|
||||
Snacks.util.get_lang(lang)
|
||||
```
|
||||
|
||||
### `Snacks.util.icon()`
|
||||
|
||||
Get an icon from `mini.icons` or `nvim-web-devicons`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue