Loading pkgs/applications/editors/neovim/module.nix +14 −3 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ let optional = false; }; in map (x: defaultPlugin // (if (x ? plugin) then x else { plugin = x; })) plugins; map (x: defaultPlugin // (if x ? plugin then x else { plugin = x; })) plugins; pluginWithConfigType = with lib; Loading Loading @@ -78,17 +78,26 @@ in userPluginViml = lib.mkOption { readOnly = true; type = lib.types.listOf (lib.types.lines); type = lib.types.listOf lib.types.lines; description = '' The viml config set by the user. ''; }; pluginPython3Packages = lib.mkOption { readOnly = true; type = lib.types.listOf (lib.types.functionTo (lib.types.listOf lib.types.package)); example = lib.literalExpression "[ (ps: [ ps.python-language-server ]) ]"; description = '' Packages required by the plugins to work with the python3 provider. ''; }; }; config = let pluginsNormalized = normalizePlugins config.plugins; pluginsNormalized = config.plugins; in { pluginAdvisedLua = Loading @@ -111,5 +120,7 @@ in userPluginViml = lib.foldl ( acc: p: if p.config != null then acc ++ [ p.config ] else acc ) [ ] pluginsNormalized; pluginPython3Packages = map (plugin: plugin.python3Dependencies or (_: [ ])) pluginsNormalized; }; } pkgs/applications/editors/neovim/utils.nix +2 −7 Original line number Diff line number Diff line Loading @@ -99,24 +99,19 @@ let inherit plugins; }; pluginsNormalized = normalizePlugins plugins; pluginsNormalized = checked_cfg.plugins; vimPackage = normalizedPluginsToVimPackage pluginsNormalized; getDeps = attrname: map (plugin: plugin.${attrname} or (_: [ ])); requiredPlugins = vimUtils.requiredPluginsForPackage vimPackage; pluginPython3Packages = getDeps "python3Dependencies" requiredPlugins; in { # plugins' python dependencies inherit pluginPython3Packages; # viml config set by the user along with the plugin inherit (checked_cfg) userPluginViml runtimeDeps pluginAdvisedLua pluginPython3Packages ; # A Vim "package", see ':h packages' Loading Loading
pkgs/applications/editors/neovim/module.nix +14 −3 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ let optional = false; }; in map (x: defaultPlugin // (if (x ? plugin) then x else { plugin = x; })) plugins; map (x: defaultPlugin // (if x ? plugin then x else { plugin = x; })) plugins; pluginWithConfigType = with lib; Loading Loading @@ -78,17 +78,26 @@ in userPluginViml = lib.mkOption { readOnly = true; type = lib.types.listOf (lib.types.lines); type = lib.types.listOf lib.types.lines; description = '' The viml config set by the user. ''; }; pluginPython3Packages = lib.mkOption { readOnly = true; type = lib.types.listOf (lib.types.functionTo (lib.types.listOf lib.types.package)); example = lib.literalExpression "[ (ps: [ ps.python-language-server ]) ]"; description = '' Packages required by the plugins to work with the python3 provider. ''; }; }; config = let pluginsNormalized = normalizePlugins config.plugins; pluginsNormalized = config.plugins; in { pluginAdvisedLua = Loading @@ -111,5 +120,7 @@ in userPluginViml = lib.foldl ( acc: p: if p.config != null then acc ++ [ p.config ] else acc ) [ ] pluginsNormalized; pluginPython3Packages = map (plugin: plugin.python3Dependencies or (_: [ ])) pluginsNormalized; }; }
pkgs/applications/editors/neovim/utils.nix +2 −7 Original line number Diff line number Diff line Loading @@ -99,24 +99,19 @@ let inherit plugins; }; pluginsNormalized = normalizePlugins plugins; pluginsNormalized = checked_cfg.plugins; vimPackage = normalizedPluginsToVimPackage pluginsNormalized; getDeps = attrname: map (plugin: plugin.${attrname} or (_: [ ])); requiredPlugins = vimUtils.requiredPluginsForPackage vimPackage; pluginPython3Packages = getDeps "python3Dependencies" requiredPlugins; in { # plugins' python dependencies inherit pluginPython3Packages; # viml config set by the user along with the plugin inherit (checked_cfg) userPluginViml runtimeDeps pluginAdvisedLua pluginPython3Packages ; # A Vim "package", see ':h packages' Loading