mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 16:39:00 +02:00
31 lines
573 B
Nix
31 lines
573 B
Nix
|
{
|
||
|
config,
|
||
|
lib,
|
||
|
...
|
||
|
}:
|
||
|
let
|
||
|
implementations = [
|
||
|
"lz-n"
|
||
|
"lazy"
|
||
|
];
|
||
|
in
|
||
|
{
|
||
|
config = {
|
||
|
assertions =
|
||
|
let
|
||
|
enabled = builtins.filter (x: config.plugins.${x}.enable) implementations;
|
||
|
count = builtins.length enabled;
|
||
|
in
|
||
|
[
|
||
|
{
|
||
|
assertion = count < 2;
|
||
|
message = ''
|
||
|
You have multiple lazy-loaders enabled:
|
||
|
${lib.concatImapStringsSep "\n" (i: x: "${toString i}. plugins.${x}") enabled}
|
||
|
Please ensure only one is enabled at a time.
|
||
|
'';
|
||
|
}
|
||
|
];
|
||
|
};
|
||
|
}
|