mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
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.
56 lines
1.3 KiB
Nix
56 lines
1.3 KiB
Nix
{
|
|
empty = {
|
|
plugins.firenvim.enable = true;
|
|
};
|
|
|
|
example = {
|
|
plugins.firenvim = {
|
|
enable = true;
|
|
|
|
settings = {
|
|
globalSettings.alt = "all";
|
|
localSettings = {
|
|
".*" = {
|
|
cmdline = "neovim";
|
|
content = "text";
|
|
priority = 0;
|
|
selector = "textarea";
|
|
takeover = "always";
|
|
};
|
|
"https?://[^/]+\\.co\\.uk/" = {
|
|
takeover = "never";
|
|
priority = 1;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
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";
|
|
};
|
|
};
|
|
};
|
|
}
|