mirror of https://github.com/folke/lazy.nvim.git
chore(build): auto-generate docs
This commit is contained in:
parent
12850c2a34
commit
152e0bcae8
|
@ -1062,7 +1062,7 @@ To make it easier for users to install your plugin, you can include a [package s
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
- Inside a `build` function or `*.lua` build file, use `coroutine.yield(status_msg)` to show progress.
|
- Inside a `build` function or `*.lua` build file, use `coroutine.yield(msg:string|LazyMsg)` to show progress.
|
||||||
|
|
||||||
- Don't change the `cwd` in your build function, since builds run in parallel and changing the `cwd` will affect other builds.
|
- Don't change the `cwd` in your build function, since builds run in parallel and changing the `cwd` will affect other builds.
|
||||||
|
|
||||||
|
@ -1080,9 +1080,18 @@ The spec **build** property can be one of the following:
|
||||||
- if no `build` is specified, but a `build.lua` file exists, that will be used instead.
|
- if no `build` is specified, but a `build.lua` file exists, that will be used instead.
|
||||||
|
|
||||||
Build functions and `*.lua` files run asynchronously in a coroutine.
|
Build functions and `*.lua` files run asynchronously in a coroutine.
|
||||||
Use `coroutine.yield(status_msg)` to show progress.
|
Use `coroutine.yield(msg:string|LazyMsg)` to show progress.
|
||||||
|
|
||||||
Yielding will also schedule the next `coroutine.resume()` to run in the next tick, so you can do long-running tasks without blocking Neovim.
|
Yielding will also schedule the next `coroutine.resume()` to run in the next tick, so you can do long-running tasks without blocking Neovim.
|
||||||
|
|
||||||
|
```lua
|
||||||
|
---@class LazyMsg
|
||||||
|
---@field msg string
|
||||||
|
---@field level? number vim.log.levels.XXX
|
||||||
|
```
|
||||||
|
|
||||||
|
Use `vim.log.levels.TRACE` to only show the message as a **status** message for the task.
|
||||||
|
|
||||||
:::tip
|
:::tip
|
||||||
|
|
||||||
If you need to know the directory of your build lua file, you can use:
|
If you need to know the directory of your build lua file, you can use:
|
||||||
|
|
|
@ -1226,7 +1226,7 @@ BEST PRACTICES *lazy.nvim-🔥-developers-best-practices*
|
||||||
loaded. Lua plugins/libraries are automatically loaded when they are
|
loaded. Lua plugins/libraries are automatically loaded when they are
|
||||||
`require()`d, so they don’t need to be in `dependencies`.
|
`require()`d, so they don’t need to be in `dependencies`.
|
||||||
- Inside a `build` function or `*.lua` build file, use
|
- Inside a `build` function or `*.lua` build file, use
|
||||||
`coroutine.yield(status_msg)` to show progress.
|
`coroutine.yield(msg:string|LazyMsg)` to show progress.
|
||||||
- Don’t change the `cwd` in your build function, since builds run in parallel
|
- Don’t change the `cwd` in your build function, since builds run in parallel
|
||||||
and changing the `cwd` will affect other builds.
|
and changing the `cwd` will affect other builds.
|
||||||
|
|
||||||
|
@ -1245,9 +1245,19 @@ The spec **build** property can be one of the following:
|
||||||
- if no `build` is specified, but a `build.lua` file exists, that will be used instead.
|
- if no `build` is specified, but a `build.lua` file exists, that will be used instead.
|
||||||
|
|
||||||
Build functions and `*.lua` files run asynchronously in a coroutine. Use
|
Build functions and `*.lua` files run asynchronously in a coroutine. Use
|
||||||
`coroutine.yield(status_msg)` to show progress. Yielding will also schedule the
|
`coroutine.yield(msg:string|LazyMsg)` to show progress.
|
||||||
next `coroutine.resume()` to run in the next tick, so you can do long-running
|
|
||||||
tasks without blocking Neovim.
|
Yielding will also schedule the next `coroutine.resume()` to run in the next
|
||||||
|
tick, so you can do long-running tasks without blocking Neovim.
|
||||||
|
|
||||||
|
>lua
|
||||||
|
---@class LazyMsg
|
||||||
|
---@field msg string
|
||||||
|
---@field level? number vim.log.levels.XXX
|
||||||
|
<
|
||||||
|
|
||||||
|
Use `vim.log.levels.TRACE` to only show the message as a **status** message for
|
||||||
|
the task.
|
||||||
|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
Loading…
Reference in New Issue