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
50912dc2fd
commit
5d1ae36d81
4 changed files with 35 additions and 27 deletions
|
|
@ -119,3 +119,14 @@ Delete an animation
|
|||
---@param id number|string
|
||||
Snacks.animate.del(id)
|
||||
```
|
||||
|
||||
### `Snacks.animate.enabled()`
|
||||
|
||||
Check if animations are enabled.
|
||||
Will return false if `snacks_animate` is set to false or if the buffer
|
||||
local variable `snacks_animate` is set to false.
|
||||
|
||||
```lua
|
||||
---@param opts? {buf?: number, name?: string}
|
||||
Snacks.animate.enabled(opts)
|
||||
```
|
||||
|
|
|
|||
|
|
@ -67,14 +67,6 @@ Similar plugins:
|
|||
Snacks.dim()
|
||||
```
|
||||
|
||||
### `Snacks.dim.animate()`
|
||||
|
||||
Toggle scope animations
|
||||
|
||||
```lua
|
||||
Snacks.dim.animate()
|
||||
```
|
||||
|
||||
### `Snacks.dim.disable()`
|
||||
|
||||
Disable dimming
|
||||
|
|
|
|||
|
|
@ -53,20 +53,20 @@ Similar plugins:
|
|||
-- "SnacksIndent8",
|
||||
-- },
|
||||
},
|
||||
-- animate scopes. Enabled by default for Neovim >= 0.10
|
||||
-- Works on older versions but has to trigger redraws during animation.
|
||||
---@type snacks.animate.Config|{enabled?: boolean}
|
||||
animate = {
|
||||
enabled = vim.fn.has("nvim-0.10") == 1,
|
||||
easing = "linear",
|
||||
duration = {
|
||||
step = 20, -- ms per step
|
||||
total = 500, -- maximum duration
|
||||
},
|
||||
},
|
||||
---@class snacks.indent.Scope.Config: snacks.scope.Config
|
||||
scope = {
|
||||
enabled = true, -- enable highlighting the current scope
|
||||
-- animate scopes. Enabled by default for Neovim >= 0.10
|
||||
-- Works on older versions but has to trigger redraws during animation.
|
||||
---@type snacks.animate.Config|{enabled?: boolean}
|
||||
animate = {
|
||||
enabled = vim.fn.has("nvim-0.10") == 1,
|
||||
easing = "linear",
|
||||
duration = {
|
||||
step = 20, -- ms per step
|
||||
total = 500, -- maximum duration
|
||||
},
|
||||
},
|
||||
char = "│",
|
||||
underline = false, -- underline the start of the scope
|
||||
only_current = false, -- only show scope in the current window
|
||||
|
|
@ -112,14 +112,6 @@ Similar plugins:
|
|||
|
||||
## 📦 Module
|
||||
|
||||
### `Snacks.indent.animate()`
|
||||
|
||||
Toggle scope animations
|
||||
|
||||
```lua
|
||||
Snacks.indent.animate()
|
||||
```
|
||||
|
||||
### `Snacks.indent.disable()`
|
||||
|
||||
Disable indent guides
|
||||
|
|
|
|||
13
docs/util.md
13
docs/util.md
|
|
@ -125,6 +125,19 @@ Ensures the hl groups are always set, even after a colorscheme change.
|
|||
Snacks.util.set_hl(groups, opts)
|
||||
```
|
||||
|
||||
### `Snacks.util.var()`
|
||||
|
||||
Get a buffer or global variable.
|
||||
|
||||
```lua
|
||||
---@generic T
|
||||
---@param buf? number
|
||||
---@param name string
|
||||
---@param default? T
|
||||
---@return T
|
||||
Snacks.util.var(buf, name, default)
|
||||
```
|
||||
|
||||
### `Snacks.util.wo()`
|
||||
|
||||
Set window-local options.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue