lib/helpers: init neovim-plugin.mkSetupOptionsOption

This commit is contained in:
Gaetan Lepage 2024-01-25 16:17:36 +01:00 committed by Gaétan Lepage
parent e2c3459d1d
commit 43f3cb7ab2

View file

@ -3,6 +3,27 @@
nixvimOptions,
}:
with lib; {
mkSetupOptionsOption = pluginName: options: {
type = with types;
submodule {
freeformType = with types; attrsOf anything;
inherit options;
};
description = ''
Options provided to the `require('${pluginName}').setup` function.
'';
default = {};
example = {
foo_bar = 42;
hostname = "localhost:8080";
callback.__raw = ''
function()
print('nixvim')
end
'';
};
};
extraOptionsOptions = {
extraOptions = mkOption {
default = {};