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

@ -116,14 +116,15 @@ lib.nixvim.plugins.mkNeovimPlugin {
};
extraConfig = cfg: {
warnings =
lib.optional
(
(lib.isBool cfg.settings.devicons) && cfg.settings.devicons && (!config.plugins.web-devicons.enable)
)
''
Nixvim (colorschemes.monokai-pro): You have enabled `settings.devicons` but `plugins.web-devicons.enable` is `false`.
Consider enabling the plugin for proper devicons support.
'';
warnings = lib.nixvim.mkWarnings "colorschemes.monokai-pro" {
when =
(lib.isBool cfg.settings.devicons)
&& cfg.settings.devicons
&& (!config.plugins.web-devicons.enable);
message = ''
You have enabled `settings.devicons` but `plugins.web-devicons.enable` is `false`.
Consider enabling the plugin for proper devicons support.
'';
};
};
}