mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-06-28 19:34:15 +00:00
docs: append opts example to setup
This commit is contained in:
parent
57cce98dfd
commit
c6f4741769
1 changed files with 8 additions and 3 deletions
11
README.md
11
README.md
|
@ -665,10 +665,12 @@ As part of a spec, you can add `import` statements to import additional plugin m
|
||||||
Both of the `setup()` calls are equivalent:
|
Both of the `setup()` calls are equivalent:
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
require("lazy").setup("plugins")
|
opts = { defaults = { lazy = true } }
|
||||||
|
|
||||||
|
require("lazy").setup("plugins", opts)
|
||||||
|
|
||||||
-- Same as:
|
-- Same as:
|
||||||
require("lazy").setup({{import = "plugins"}})
|
require("lazy").setup({{import = "plugins"}}, opts)
|
||||||
```
|
```
|
||||||
|
|
||||||
To import multiple modules from a plugin, add additional specs for each import.
|
To import multiple modules from a plugin, add additional specs for each import.
|
||||||
|
@ -679,7 +681,10 @@ require("lazy").setup({
|
||||||
spec = {
|
spec = {
|
||||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||||
{ import = "lazyvim.plugins.extras.coding.copilot" },
|
{ import = "lazyvim.plugins.extras.coding.copilot" },
|
||||||
}
|
},
|
||||||
|
defaults = {
|
||||||
|
lazy = true,
|
||||||
|
},
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue