diff --git a/tests/test-sources/plugins/pluginmanagers/lz-n.nix b/tests/test-sources/plugins/pluginmanagers/lz-n.nix index 8537f54425..7f07222775 100644 --- a/tests/test-sources/plugins/pluginmanagers/lz-n.nix +++ b/tests/test-sources/plugins/pluginmanagers/lz-n.nix @@ -1,9 +1,14 @@ { pkgs, helpers, ... }: let - optionalPlugins = map (plugin: { - inherit plugin; - optional = true; - }); + /* + Transform plugins into attrset and set optional to true + This installs the plugin files to {runtimepath}/pack/opt, instead of {runtimepath}/pack/start. + Plugins in pack/opt are not loaded on startup, but can be later loaded with `:packadd {name}` or `require("lz.n").load({name})` + + See `nixpkgs/pkgs/applications/editors/neovim/utils.nix` + See `nixpkgs/pkgs/applications/editors/vim/plugins/vim-utils.nix` + */ + optionalPlugins = map (x: (if (x ? plugin) then x else { plugin = x; }) // { optional = true; }); in { # Empty configuration