mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
treewide: use mkAssertions where possible
This commit is contained in:
parent
12e658eca8
commit
ce82e5859d
14 changed files with 94 additions and 104 deletions
|
@ -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" ];
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue