From 5b7d5676741bf34b58b250b2948a06c68e0fb157 Mon Sep 17 00:00:00 2001 From: Joel Goguen Date: Thu, 18 May 2023 09:29:05 -0400 Subject: [PATCH] docs: Add example of multiple plugin spec modules --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 7292e4a..3451a52 100644 --- a/README.md +++ b/README.md @@ -671,6 +671,19 @@ require("lazy").setup("plugins") require("lazy").setup({{import = "plugins"}}) ``` +If you need to load plugins from multiple locations, such as for a global and +a site-local Neovim configuration, you can do that with multiple import +statements: + +```lua +require("lazy").setup( + { + { import = "plugins.global" }, + { import = "plugins.local" }, + } +) +``` + To import multiple modules from a plugin, add additional specs for each import. For example, to import LazyVim core plugins and an optional plugin: