diff --git a/lib/types/plugins.nix b/lib/types/plugins.nix index c5b6e54..7db0019 100644 --- a/lib/types/plugins.nix +++ b/lib/types/plugins.nix @@ -107,10 +107,13 @@ with lib; let after = mkOption { type = listOf str; default = []; + description = "Setup this plugin after the following ones."; }; setup = mkOption { type = lines; default = ""; + description = "Lua code to run during setup."; + example = "require('aerial').setup {}"; }; }; }; diff --git a/modules/core/default.nix b/modules/core/default.nix index bab8803..fd097ef 100644 --- a/modules/core/default.nix +++ b/modules/core/default.nix @@ -161,6 +161,22 @@ in { extraPlugins = mkOption { type = types.attrsOf nvim.types.extraPluginType; default = {}; + description = '' + List of plugins and related config. + Note that these are setup after builtin plugins. + ''; + example = literalExpression '' + with pkgs.vimPlugins; { + aerial = { + package = aerial-nvim; + setup = "require('aerial').setup {}"; + }; + harpoon = { + package = harpoon; + setup = "require('harpoon').setup {}"; + after = ["aerial"]; + }; + }''; }; globals = mkOption {