docs: docgen

This commit is contained in:
Folke Lemaitre 2025-02-17 14:46:42 +01:00
parent 1f9ba12755
commit dadc934802
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
4 changed files with 51 additions and 57 deletions

View file

@ -3,20 +3,29 @@
==============================================================================
Table of Contents *snacks-image-table-of-contents*
1. Setup |snacks-image-setup|
2. Config |snacks-image-config|
3. Styles |snacks-image-styles|
1. Features |snacks-image-features|
2. Setup |snacks-image-setup|
3. Config |snacks-image-config|
4. Styles |snacks-image-styles|
- snacks_image |snacks-image-styles-snacks_image|
4. Types |snacks-image-types|
5. Module |snacks-image-module|
5. Types |snacks-image-types|
6. Module |snacks-image-module|
- Snacks.image.hover() |snacks-image-module-snacks.image.hover()|
- Snacks.image.langs() |snacks-image-module-snacks.image.langs()|
- Snacks.image.supports() |snacks-image-module-snacks.image.supports()|
- Snacks.image.supports_file()|snacks-image-module-snacks.image.supports_file()|
- Snacks.image.supports_terminal()|snacks-image-module-snacks.image.supports_terminal()|
6. Links |snacks-image-links|
Image viewer using the Kitty Graphics Protocol
<https://sw.kovidgoyal.net/kitty/graphics-protocol/>.
7. Links |snacks-image-links|
==============================================================================
1. Features *snacks-image-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:
@ -45,17 +54,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).
@ -63,7 +61,7 @@ In case of issues, make sure to run `:checkhealth snacks`.
==============================================================================
1. Setup *snacks-image-setup*
2. Setup *snacks-image-setup*
>lua
-- lazy.nvim
@ -82,7 +80,7 @@ In case of issues, make sure to run `:checkhealth snacks`.
==============================================================================
2. Config *snacks-image-config*
3. Config *snacks-image-config*
>lua
---@class snacks.image.Config
@ -138,7 +136,7 @@ In case of issues, make sure to run `:checkhealth snacks`.
==============================================================================
3. Styles *snacks-image-styles*
4. Styles *snacks-image-styles*
Check the styles
<https://github.com/folke/snacks.nvim/blob/main/docs/styles.md> docs for more
@ -161,7 +159,7 @@ SNACKS_IMAGE *snacks-image-styles-snacks_image*
==============================================================================
4. Types *snacks-image-types*
5. Types *snacks-image-types*
>lua
---@alias snacks.image.Size {width: number, height: number}
@ -197,7 +195,7 @@ SNACKS_IMAGE *snacks-image-styles-snacks_image*
==============================================================================
5. Module *snacks-image-module*
6. Module *snacks-image-module*
>lua
---@class snacks.image
@ -259,7 +257,7 @@ Check if the terminal supports the kitty graphics protocol
<
==============================================================================
6. Links *snacks-image-links*
7. Links *snacks-image-links*
1. *Image*: https://github.com/user-attachments/assets/4e8a686c-bf41-4989-9d74-1641ecf2835f

View file

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

View file

@ -2,7 +2,14 @@
![Image](https://github.com/user-attachments/assets/4e8a686c-bf41-4989-9d74-1641ecf2835f)
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).

View file

@ -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()
```