mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
chore(build): auto-generate docs
This commit is contained in:
parent
9ad5d5374a
commit
a54477b0ac
1 changed files with 15 additions and 2 deletions
|
|
@ -149,7 +149,11 @@ Snacks.picker.pick({source = "files", ...})
|
|||
},
|
||||
file = {
|
||||
filename_first = false, -- display filename before the file path
|
||||
truncate = 40, -- truncate the file path to (roughly) this length
|
||||
--- * left: truncate the beginning of the path
|
||||
--- * center: truncate the middle of the path
|
||||
--- * right: truncate the end of the path
|
||||
---@type "left"|"center"|"right"
|
||||
truncate = "center",
|
||||
filename_only = false, -- only show the filename
|
||||
icon_width = 2, -- width of the icon (in characters)
|
||||
git_status_hl = true, -- use the git status highlight group for the filename
|
||||
|
|
@ -621,8 +625,17 @@ Snacks.picker.pick({source = "files", ...})
|
|||
```
|
||||
|
||||
```lua
|
||||
---@class snacks.picker.format.ctx
|
||||
---@field picker snacks.Picker
|
||||
---@field item snacks.picker.Item
|
||||
---@field offset number
|
||||
---@field max_width number
|
||||
```
|
||||
|
||||
```lua
|
||||
---@alias snacks.picker.format.resolve fun(ctx:snacks.picker.format.ctx):snacks.picker.Highlight[]
|
||||
---@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}
|
||||
---@alias snacks.picker.Text {[1]:string, [2]:string?, virtual?:boolean, field?:string, resolve?:snacks.picker.format.resolve}
|
||||
---@alias snacks.picker.Highlight snacks.picker.Text|snacks.picker.Extmark
|
||||
---@alias snacks.picker.format fun(item:snacks.picker.Item, picker:snacks.Picker):snacks.picker.Highlight[]
|
||||
---@alias snacks.picker.preview fun(ctx: snacks.picker.preview.ctx):boolean?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue