treewide: use mkAssertions wherever possible

This commit is contained in:
Gaetan Lepage 2025-01-20 14:23:55 +01:00
parent a7e516b322
commit af6e4b0bad
13 changed files with 63 additions and 72 deletions

View file

@ -119,7 +119,7 @@ in
} // cfg.extraOptions;
in
mkIf cfg.enable {
assertions = [
assertions = lib.nixvim.mkAssertions "plugins.nvim-jdtls" [
{
assertion = cfg.cmd != null || cfg.data != null;
message = "You have to either set the `plugins.nvim-jdtls.data` or the `plugins.nvim-jdtls.cmd` option.";
@ -127,7 +127,7 @@ in
{
assertion = cfg.cmd == null -> cfg.jdtLanguageServerPackage != null;
message = ''
Nixvim (plugins.nvim-jdtls) You haven't defined a `cmd` or `jdtLanguageServerPackage`.
You haven't defined a `cmd` or `jdtLanguageServerPackage`.
The default `cmd` requires `plugins.nvim-jdtls.jdtLanguageServerPackage` to be set.
'';