docs: docgen

This commit is contained in:
Folke Lemaitre 2024-12-10 14:15:40 +01:00
parent 251fbd9b93
commit f6d427b4f7
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
7 changed files with 31 additions and 0 deletions

View file

@ -10,6 +10,7 @@ Table of Contents *snacks-dim-table-of-contents*
- Snacks.dim.animate() |snacks-dim-module-snacks.dim.animate()|
- Snacks.dim.disable() |snacks-dim-module-snacks.dim.disable()|
- Snacks.dim.enable() |snacks-dim-module-snacks.dim.enable()|
4. Links |snacks-dim-links|
Focus on the active scope by dimming the rest.
Similar plugins:
@ -105,6 +106,11 @@ Disable dimming
Snacks.dim.enable(opts)
<
==============================================================================
4. Links *snacks-dim-links*
1. *image*: https://github.com/user-attachments/assets/c0c5ffda-aaeb-4578-8a18-abee2e443a93
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>
vim:tw=78:ts=8:noet:ft=help:norl:

View file

@ -10,6 +10,7 @@ Table of Contents *snacks-indent-table-of-contents*
- Snacks.indent.animate() |snacks-indent-module-snacks.indent.animate()|
- Snacks.indent.disable() |snacks-indent-module-snacks.indent.disable()|
- Snacks.indent.enable() |snacks-indent-module-snacks.indent.enable()|
5. Links |snacks-indent-links|
Visualize indent guides and scopes based on treesitter or indent.
Similar plugins:
@ -134,6 +135,11 @@ Enable indent guides
Snacks.indent.enable()
<
==============================================================================
5. Links *snacks-indent-links*
1. *image*: https://github.com/user-attachments/assets/56a99495-05ab-488e-9619-574cb7ff2b7d
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>
vim:tw=78:ts=8:noet:ft=help:norl:

View file

@ -13,6 +13,9 @@ Table of Contents *snacks-input-table-of-contents*
- Snacks.input.disable() |snacks-input-module-snacks.input.disable()|
- Snacks.input.enable() |snacks-input-module-snacks.input.enable()|
- Snacks.input.input() |snacks-input-module-snacks.input.input()|
6. Links |snacks-input-links|
Better `vim.ui.input`.
==============================================================================
1. Setup *snacks-input-setup*
@ -128,6 +131,11 @@ INPUT *snacks-input-styles-input*
Snacks.input.input(opts, on_confirm)
<
==============================================================================
6. Links *snacks-input-links*
1. *image*: https://github.com/user-attachments/assets/f7579302-bea1-4f1c-8b3b-723c3f4ca04b
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>
vim:tw=78:ts=8:noet:ft=help:norl:

View file

@ -6,6 +6,8 @@ Table of Contents *snacks-meta-table-of-contents*
1. Types |snacks-meta-types|
2. Module |snacks-meta-module|
- Snacks.meta.get() |snacks-meta-module-snacks.meta.get()|
Meta functions for Snacks
==============================================================================
1. Types *snacks-meta-types*

View file

@ -12,6 +12,7 @@ Table of Contents *snacks-zen-table-of-contents*
- Snacks.zen() |snacks-zen-module-snacks.zen()|
- Snacks.zen.zen() |snacks-zen-module-snacks.zen.zen()|
- Snacks.zen.zoom() |snacks-zen-module-snacks.zen.zoom()|
5. Links |snacks-zen-links|
Zen mode • distraction-free coding. Integrates with `Snacks.toggle` to toggle
various UI elements and with `Snacks.dim` to dim code out of scope.
@ -144,6 +145,11 @@ fullscreen indicator only shown when the window is maximized
Snacks.zen.zoom(opts)
<
==============================================================================
5. Links *snacks-zen-links*
1. *image*: https://github.com/user-attachments/assets/77c607ec-c354-4e17-bcd1-fdcd4b4c0057
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>
vim:tw=78:ts=8:noet:ft=help:norl:

View file

@ -1,5 +1,7 @@
# 🍿 meta
Meta functions for Snacks
<!-- docgen -->
## 📚 Types

View file

@ -69,6 +69,7 @@ local ctx = {}
---@param opts? snacks.input.Opts
---@param on_confirm fun(value?: string)
function M.input(opts, on_confirm)
assert(type(on_confirm) == "function", "`on_confirm` must be a function")
local function confirm(value)
ctx.win = nil
ctx.opts = nil