treewide: use mkAssertions where possible

This commit is contained in:
Gaetan Lepage 2025-01-29 15:50:36 +01:00
parent 12e658eca8
commit ce82e5859d
14 changed files with 94 additions and 104 deletions

View file

@ -26,15 +26,14 @@ lib.nixvim.plugins.mkNeovimPlugin {
};
extraConfig = cfg: {
assertions = [
{
assertion = cfg.enableTelescope -> config.plugins.telescope.enable;
message = ''
Nixvim: You have enabled the `telescope` integration with refactoring-nvim.
However, you have not enabled the `telescope` plugin itself (`plugins.telescope.enable = true`).
'';
}
];
assertions = lib.nixvim.mkAssertions "plugins.refactoring" {
assertion = cfg.enableTelescope -> config.plugins.telescope.enable;
message = ''
You have enabled the `telescope` integration with refactoring-nvim.
However, you have not enabled the `telescope` plugin itself (`plugins.telescope.enable = true`).
'';
};
plugins.telescope.enabledExtensions = mkIf cfg.enableTelescope [ "refactoring" ];
};