plugins/utils: normalize plugin defaults

This commit is contained in:
Matt Sturgeon 2024-06-11 16:54:57 +01:00
parent b10a391bd0
commit 6ab2a39e6a
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
53 changed files with 1434 additions and 1221 deletions

View file

@ -36,7 +36,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
description = "Executable to run.";
};
args = helpers.defaultNullOpts.mkListOf types.str "[]" ''
args = helpers.defaultNullOpts.mkListOf types.str [ ] ''
List of arguments to provide to the engine.
'';
@ -58,7 +58,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
The description for this option.
'';
};
}) "{}" "The options for this engine.";
}) { } "The options for this engine.";
};
})
)
@ -93,17 +93,15 @@ helpers.neovim-plugin.mkNeovimPlugin config {
line_sep = helpers.defaultNullOpts.mkStr "" "Line separator.";
highlight = helpers.defaultNullOpts.mkAttrsOf types.str ''
{
headers = "SpectreHeader";
ui = "SpectreBody";
filename = "SpectreFile";
filedirectory = "SpectreDir";
search = "SpectreSearch";
border = "SpectreBorder";
replace = "SpectreReplace";
}
'' "Highlight groups.";
highlight = helpers.defaultNullOpts.mkAttrsOf types.str {
headers = "SpectreHeader";
ui = "SpectreBody";
filename = "SpectreFile";
filedirectory = "SpectreDir";
search = "SpectreSearch";
border = "SpectreBorder";
replace = "SpectreReplace";
} "Highlight groups.";
mapping =
helpers.mkNullOrOption
@ -144,7 +142,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
Which find engine to use. Pick one from the `find_engine` list.
'';
options = helpers.defaultNullOpts.mkListOf types.str ''["ignore-case"]'' ''
options = helpers.defaultNullOpts.mkListOf types.str [ "ignore-case" ] ''
Options to use for this engine.
'';
};
@ -154,7 +152,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
Which find engine to use. Pick one from the `replace_engine` list.
'';
options = helpers.defaultNullOpts.mkListOf types.str "[]" ''
options = helpers.defaultNullOpts.mkListOf types.str [ ] ''
Options to use for this engine.
'';
};