mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-13 21:32:23 +03:00
Merge pull request #24353 from edanaher/fix-vim-knownplugins
vim-utils: Handle overriding knownPlugins betters.
This commit is contained in:
commit
7ebc75a9a6
@ -412,11 +412,16 @@ rec {
|
||||
} // a);
|
||||
|
||||
requiredPlugins = {
|
||||
knownPlugins ? vimPlugins,
|
||||
givenKnownPlugins ? null,
|
||||
vam ? null,
|
||||
pathogen ? null, ...
|
||||
}:
|
||||
let
|
||||
# This is probably overcomplicated, but I don't understand this well enough to know what's necessary.
|
||||
knownPlugins = if givenKnownPlugins != null then givenKnownPlugins else
|
||||
if vam != null && vam ? knownPlugins then vam.knownPlugins else
|
||||
if pathogen != null && pathogen ? knownPlugins then pathogen.knownPlugins else
|
||||
vimPlugins;
|
||||
pathogenNames = map (name: knownPlugins.${name}) (findDependenciesRecursively { inherit knownPlugins; names = pathogen.pluginNames; });
|
||||
vamNames = findDependenciesRecursively { inherit knownPlugins; names = lib.concatMap toNames vam.pluginDictionaries; };
|
||||
names = (lib.optionals (pathogen != null) pathogenNames) ++
|
||||
|
Loading…
Reference in New Issue
Block a user