mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-03 17:45:03 +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
|
@ -101,13 +101,15 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
};
|
||||
|
||||
extraConfig = cfg: {
|
||||
warnings =
|
||||
optional ((isBool cfg.settings.trouble && cfg.settings.trouble) && !config.plugins.trouble.enable)
|
||||
''
|
||||
Nixvim (plugins.gitsigns): You have enabled `plugins.gitsigns.settings.trouble` but
|
||||
`plugins.trouble.enable` is `false`.
|
||||
You should maybe enable the `trouble` plugin.
|
||||
'';
|
||||
warnings = lib.nixvim.mkWarnings "plugins.gitsigns" {
|
||||
when = (isBool cfg.settings.trouble && cfg.settings.trouble) && !config.plugins.trouble.enable;
|
||||
|
||||
message = ''
|
||||
You have enabled `plugins.gitsigns.settings.trouble` but `plugins.trouble.enable` is `false`.
|
||||
You should maybe enable the `trouble` plugin.
|
||||
'';
|
||||
};
|
||||
|
||||
extraPackages = [ cfg.gitPackage ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue