mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 10:49:08 +00:00
docs: docgen
This commit is contained in:
parent
1f9ba12755
commit
dadc934802
4 changed files with 51 additions and 57 deletions
|
@ -2,7 +2,14 @@
|
|||
|
||||

|
||||
|
||||
Image viewer using the [Kitty Graphics Protocol](https://sw.kovidgoyal.net/kitty/graphics-protocol/).
|
||||
## ✨ Features
|
||||
|
||||
- Image viewer using the [Kitty Graphics Protocol](https://sw.kovidgoyal.net/kitty/graphics-protocol/).
|
||||
- open images in a wide range of formats:
|
||||
`png`, `jpg`, `jpeg`, `gif`, `bmp`, `webp`, `tiff`, `heic`, `avif`, `mp4`, `mov`, `avi`, `mkv`, `webm`
|
||||
- Supports inline image rendering in:
|
||||
`markdown`, `html`, `norg`, `tsx`, `javascript`, `css`, `vue`, `scss`, `latex`, `typst`, `vue`
|
||||
- LaTex math expressions in `markdown` and `latex` documents
|
||||
|
||||
Terminal support:
|
||||
|
||||
|
@ -29,17 +36,6 @@ In order to automatically display the image when opening an image file,
|
|||
or to have imaged displayed in supported document formats like `markdown` or `html`,
|
||||
you need to enable the `image` plugin in your `snacks` config.
|
||||
|
||||
Supported document formats are:
|
||||
|
||||
- markdown
|
||||
- html
|
||||
- norg
|
||||
- tsx
|
||||
- javascript
|
||||
- css
|
||||
- vue
|
||||
- angular
|
||||
|
||||
[ImageMagick](https://imagemagick.org/index.php) is required to convert images
|
||||
to the supported formats (all except PNG).
|
||||
|
||||
|
|
|
@ -605,6 +605,23 @@ 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}
|
||||
|
@ -683,23 +700,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
|
||||
|
@ -2693,8 +2693,6 @@ Snacks.picker.actions.toggle_preview(picker)
|
|||
Snacks.picker.actions.yank(picker, item, action)
|
||||
```
|
||||
|
||||
|
||||
|
||||
## 📦 `snacks.picker.core.picker`
|
||||
|
||||
```lua
|
||||
|
@ -2949,3 +2947,5 @@ Get the word under the cursor or the current visual selection
|
|||
```lua
|
||||
picker:word()
|
||||
```
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue