chore(build): auto-generate docs

This commit is contained in:
folke 2025-02-19 21:19:24 +00:00 committed by github-actions[bot]
parent 6614a2c84f
commit 77312bbaa1
4 changed files with 24 additions and 22 deletions

View file

@ -1,4 +1,4 @@
*snacks* For Neovim Last change: 2025 February 19
*snacks.nvim.txt* For Neovim Last change: 2025 February 19
==============================================================================
Table of Contents *snacks.nvim-table-of-contents*

View file

@ -12,6 +12,7 @@ a prompt will be shown to save or discard.
```lua
---@class snacks.bufdelete.Opts
---@field buf? number Buffer to delete. Defaults to the current buffer
---@field file? string Delete buffer by file name. If provided, `buf` is ignored
---@field force? boolean Delete the buffer even if it is modified
---@field filter? fun(buf: number): boolean Filter buffers to delete
---@field wipe? boolean Wipe the buffer instead of deleting it (see `:h :bwipeout`)

View file

@ -609,23 +609,6 @@ Snacks.picker.pick({source = "files", ...})
---@field notify? boolean
```
```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}
@ -704,6 +687,23 @@ 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
@ -2706,6 +2706,8 @@ Snacks.picker.actions.toggle_preview(picker)
Snacks.picker.actions.yank(picker, item, action)
```
## 📦 `snacks.picker.core.picker`
```lua
@ -2960,5 +2962,3 @@ Get the word under the cursor or the current visual selection
```lua
picker:word()
```

View file

@ -83,10 +83,11 @@ Snacks.rename.on_rename_file(from, to, rename)
### `Snacks.rename.rename_file()`
Prompt for the new filename,
Renames the provided file, or the current buffer's file.
Prompt for the new filename if `to` is not provided.
do the rename, and trigger LSP handlers
```lua
---@param opts? {file?: string, on_rename?: fun(new:string, old:string)}
---@param opts? {from?: string, to?:string, on_rename?: fun(to:string, from:string, ok:boolean)}
Snacks.rename.rename_file(opts)
```