mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-20 10:45:51 +02:00
treewide: use mkWarnings wherever possible
This commit is contained in:
parent
2ec6218f87
commit
60adb6c56b
17 changed files with 158 additions and 122 deletions
|
@ -19,17 +19,17 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
};
|
||||
|
||||
extraConfig = cfg: {
|
||||
warnings =
|
||||
lib.optional
|
||||
(
|
||||
(cfg.settings ? devicons.enable)
|
||||
&& (lib.isBool cfg.settings.devicons.enable)
|
||||
&& cfg.settings.devicons.enable
|
||||
&& (!config.plugins.web-devicons.enable)
|
||||
)
|
||||
''
|
||||
Nixvim (plugins.lir): You have enabled `settings.devicons.enable` but `plugins.web-devicons.enable` is `false`.
|
||||
Consider enabling the plugin for proper devicons support.
|
||||
'';
|
||||
warnings = lib.nixvim.mkWarnings "plugins.lir" {
|
||||
when =
|
||||
(cfg.settings ? devicons.enable)
|
||||
&& (lib.isBool cfg.settings.devicons.enable)
|
||||
&& cfg.settings.devicons.enable
|
||||
&& (!config.plugins.web-devicons.enable);
|
||||
|
||||
message = ''
|
||||
You have enabled `settings.devicons.enable` but `plugins.web-devicons.enable` is `false`.
|
||||
Consider enabling the plugin for proper devicons support.
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue