mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
lib/types/pluginLuaConfig: use lib.optional
instead of lib.mkIf
This may slightly increase performance by reducing work done by the module system.
This commit is contained in:
parent
a9345dcfc3
commit
47364df496
1 changed files with 4 additions and 4 deletions
|
@ -151,10 +151,10 @@ rec {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config.content = lib.mkMerge [
|
config.content = lib.mkMerge (
|
||||||
(lib.mkIf (config.pre != null) (mkBeforeSection config.pre))
|
lib.optional (config.pre != null) (mkBeforeSection config.pre)
|
||||||
(lib.mkIf (config.post != null) (mkAfterSection config.post))
|
++ lib.optional (config.post != null) (mkAfterSection config.post)
|
||||||
];
|
);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue