make extraPluginType singular instead of a list

This commit is contained in:
Ching Pei Yang 2023-07-21 15:30:03 +02:00
parent 2167481cc2
commit afec39f3d9
2 changed files with 9 additions and 9 deletions

View file

@ -89,20 +89,20 @@ with lib; let
"nvim-dap-ui"
];
# You can either use the name of the plugin or a package.
pluginsType = with types;
listOf (
pluginType = with types;
nullOr (
either
(enum availablePlugins)
package
)
(enum availablePlugins)
);
pluginsType = types.listOf pluginType;
extraPluginType = with types;
submodule {
options = {
package = mkOption {
type = pluginsType;
type = pluginType;
};
dependencies = mkOption {
type = listOf str;

View file

@ -302,7 +302,7 @@ in {
result;
in {
vim = {
startPlugins = concatMap (x: x.package) (attrValues cfg.extraPlugins);
startPlugins = map (x: x.package) (attrValues cfg.extraPlugins);
configRC = {
globalsScript = nvim.dag.entryAnywhere (concatStringsSep "\n" globalsScript);