2024-01-25 16:15:55 +01:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
nixvimOptions,
|
|
|
|
}:
|
|
|
|
with lib; {
|
2024-02-12 16:13:44 +01:00
|
|
|
mkSettingsOption = {
|
|
|
|
pluginName ? null,
|
|
|
|
options ? {},
|
|
|
|
description ?
|
|
|
|
if pluginName != null
|
|
|
|
then "Options provided to the `require('${pluginName}').setup` function."
|
|
|
|
else throw "mkSettingsOption: Please provide either a `pluginName` or `description`.",
|
|
|
|
example ? null,
|
|
|
|
}:
|
|
|
|
nixvimOptions.mkSettingsOption {
|
|
|
|
inherit options description example;
|
2024-01-25 16:17:36 +01:00
|
|
|
};
|
|
|
|
|
2024-02-12 16:13:44 +01:00
|
|
|
# TODO: DEPRECATED: use the `settings` option instead
|
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
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|