mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-24 17:58:38 +02:00
Allow `test.warnings` and `test.assertions` to be defined as either a list, or a function coerced to a list. When defined as a function, it is supplied an `expect` function which provides some syntactic-sugar for defining simple expectations. This is an alternative to the current approach of defining that `expect` function on an ad-hoc basis. I prefer this to adding `expect` to nixvim's lib because: 1. That would require having access to `lib` 2. IDK where in `lib` such a specialized function should live
31 lines
510 B
Nix
31 lines
510 B
Nix
let
|
|
# This plugin is deprecated
|
|
warnings = expect: [
|
|
(expect "count" 1)
|
|
(expect "any" "this plugin is obsolete and will be removed after 24.11.")
|
|
];
|
|
in
|
|
{
|
|
empty = {
|
|
plugins.nvim-osc52.enable = true;
|
|
|
|
test = { inherit warnings; };
|
|
};
|
|
|
|
defaults = {
|
|
plugins.nvim-osc52 = {
|
|
enable = true;
|
|
|
|
maxLength = 0;
|
|
silent = false;
|
|
trim = false;
|
|
|
|
keymaps = {
|
|
silent = false;
|
|
enable = true;
|
|
};
|
|
};
|
|
|
|
test = { inherit warnings; };
|
|
};
|
|
}
|