plugins/firenvim: fix aliasing settings into globals

Needed to use `options.*.settings` instead of `config.*.settings`.

I was concerned that the test-case didn't pick up on this, so I added an
new test case with some basic assertions.
This commit is contained in:
Matt Sturgeon 2024-08-08 23:30:51 +01:00
parent fab51138b7
commit c46bd820ad
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
2 changed files with 46 additions and 13 deletions

View file

@ -25,4 +25,32 @@
};
};
};
check-alias.module =
{ config, ... }:
{
assertions = [
{
assertion = config.globals ? firenvim_config;
message = "`firenvim_config` should be present in globals";
}
{
assertion = config.globals.firenvim_config.globalSettings.alt or null == "all";
message = "`globalSettings` should be have set `alt = \"all\"`";
}
{
assertion = config.globals.firenvim_config.localSettings.".*".cmdline or null == "neovim";
message = "`localSettings` should be have set `\".*\".cmdline = \"neovim\"`";
}
];
plugins.firenvim = {
enable = true;
settings = {
globalSettings.alt = "all";
localSettings.".*".cmdline = "neovim";
};
};
};
}