nix-community.nixvim/tests/test-sources/plugins/utils/firenvim.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

57 lines
1.3 KiB
Nix
Raw Normal View History

2024-08-04 10:36:55 +02:00
{
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 =
{ 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";
};
};
};
2024-08-04 10:36:55 +02:00
}