2024-01-25 16:15:55 +01:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
nixvimOptions,
|
|
|
|
}:
|
|
|
|
with lib; {
|
2024-02-07 14:21:11 +01:00
|
|
|
mkSettingsOption = pluginName: options:
|
|
|
|
mkOption {
|
|
|
|
type = with types;
|
|
|
|
submodule {
|
|
|
|
freeformType = with types; attrsOf anything;
|
|
|
|
inherit options;
|
|
|
|
};
|
|
|
|
description = ''
|
|
|
|
Options provided to the `require('${pluginName}').setup` function.
|
2024-01-25 16:17:36 +01:00
|
|
|
'';
|
2024-02-07 14:21:11 +01:00
|
|
|
default = {};
|
|
|
|
example = {
|
|
|
|
foo_bar = 42;
|
|
|
|
hostname = "localhost:8080";
|
|
|
|
callback.__raw = ''
|
|
|
|
function()
|
|
|
|
print('nixvim')
|
|
|
|
end
|
|
|
|
'';
|
|
|
|
};
|
2024-01-25 16:17:36 +01:00
|
|
|
};
|
|
|
|
|
2024-01-25 16:15:55 +01:00
|
|
|
extraOptionsOptions = {
|
|
|
|
extraOptions = mkOption {
|
|
|
|
default = {};
|
|
|
|
type = with types; attrsOf anything;
|
|
|
|
description = ''
|
|
|
|
These attributes will be added to the table parameter for the setup function.
|
2024-02-11 12:51:34 +00:00
|
|
|
Typically, it can override NixVim's default settings.
|
2024-01-25 16:15:55 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|