From 37541e57e42da6001f698e3f01aaa6615070730e Mon Sep 17 00:00:00 2001 From: Will Norris Date: Sat, 18 Mar 2023 00:38:31 -0700 Subject: [PATCH] docs(plugins): add example of multiple imports (#669) --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 7fb8de3..064e710 100644 --- a/README.md +++ b/README.md @@ -677,6 +677,18 @@ require("lazy").setup("plugins") require("lazy").setup({{import = "plugins"}}) ``` +To import multiple modules from a plugin, add additional specs for each import. +For example, to import LazyVim core plugins and an optional plugin: + +```lua +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.coding.copilot" }, + } +) +``` + When you import specs, you can override them by simply adding a spec for the same plugin to your local specs, adding any keys you want to override / merge.