treewide: use mkWarnings wherever possible

This commit is contained in:
Gaetan Lepage 2025-01-17 16:18:38 +01:00 committed by nix-infra-bot
parent 02e16b2a76
commit 2ec6218f87
7 changed files with 72 additions and 59 deletions

View file

@ -70,11 +70,12 @@ lib.nixvim.plugins.mkNeovimPlugin {
};
extraConfig = cfg: {
warnings =
optional
((isBool cfg.settings.treesitter) && cfg.settings.treesitter && (!config.plugins.treesitter.enable))
''
Nixvim (plugins.twilight): You have set `plugins.twilight.treesitter` to `true` but `plugins.treesitter.enable` is false.
'';
warnings = lib.nixvim.mkWarnings "plugins.twilight" {
when =
(isBool cfg.settings.treesitter) && cfg.settings.treesitter && (!config.plugins.treesitter.enable);
message = ''
You have set `plugins.twilight.treesitter` to `true` but `plugins.treesitter.enable` is false.
'';
};
};
}