Skip to content

Commit

Permalink
plugins/lz-n: optionalPlugins function description
Browse files Browse the repository at this point in the history
  • Loading branch information
psfloyd committed Jul 27, 2024
1 parent 64d5e3a commit 6ac95b4
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions tests/test-sources/plugins/pluginmanagers/lz-n.nix
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 6ac95b4

Please sign in to comment.