neovim-flake/modules/assertions.nix
2023-04-11 13:43:58 +03:00

21 lines
436 B
Nix

{
config,
lib,
...
}:
with lib; let
cfg = config.vim;
in {
assertions = mkMerge [
{
assertion = cfg.kommentary.enable;
message = "Kommentary has been deprecated in favor of comments-nvim";
}
mkIf
(config.programs.neovim-flake.enable)
{
assertion = !config.programs.neovim.enable;
message = "You cannot use `programs.neovim-flake.enable` with `programs.neovim.enable`";
}
];
}