plugins: normalise null plugin-defaults

Replaced all instances of `"null"` with `null`, when passing
plugin-defaults to `defaultNullOpts` functions.
This commit is contained in:
Matt Sturgeon 2024-06-02 02:58:20 +01:00
parent e58380adcd
commit d136c08f3a
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
17 changed files with 69 additions and 55 deletions

View file

@ -58,13 +58,13 @@ in
};
autoSave = {
enabled = helpers.defaultNullOpts.mkNullable types.bool "null" ''
enabled = helpers.defaultNullOpts.mkNullable types.bool null ''
Whether to enable auto saving session.
'';
};
autoRestore = {
enabled = helpers.defaultNullOpts.mkNullable types.bool "null" ''
enabled = helpers.defaultNullOpts.mkNullable types.bool null ''
Whether to enable auto restoring session.
'';
};

View file

@ -68,7 +68,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
Can be an integer or a float between 0 and 1 (e.g. 0.4 for 40%).
'';
width = helpers.defaultNullOpts.mkNullable intOrRatio "null" ''
width = helpers.defaultNullOpts.mkNullable intOrRatio null ''
Can be an integer or a float between 0 and 1 (e.g. 0.4 for 40%).
'';
@ -130,7 +130,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
Used to customize the layout.
'';
get_config = helpers.defaultNullOpts.mkLuaFn "null" ''
get_config = helpers.defaultNullOpts.mkLuaFn null ''
This can be a function that accepts the opts parameter that is passed in to 'vim.select'
or 'vim.input'. It must return either nil or config values to use in place of the global
config values for that module.
@ -153,8 +153,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
'';
telescope =
helpers.defaultNullOpts.mkNullable (with helpers.nixvimTypes; either strLua (attrsOf anything))
"null"
helpers.defaultNullOpts.mkNullable (with helpers.nixvimTypes; either strLua (attrsOf anything)) null
''
Options for telescope selector.
@ -230,7 +229,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
}
'' "An attribute set of window options.";
width = helpers.defaultNullOpts.mkNullable intOrRatio "null" ''
width = helpers.defaultNullOpts.mkNullable intOrRatio null ''
Can be an integer or a float between 0 and 1 (e.g. 0.4 for 40%).
'';
@ -252,7 +251,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
of total."
'';
height = helpers.defaultNullOpts.mkNullable intOrRatio "null" ''
height = helpers.defaultNullOpts.mkNullable intOrRatio null ''
Can be an integer or a float between 0 and 1 (e.g. 0.4 for 40%).
'';
@ -313,7 +312,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
```
'';
get_config = helpers.defaultNullOpts.mkLuaFn "null" ''
get_config = helpers.defaultNullOpts.mkLuaFn null ''
This can be a function that accepts the opts parameter that is passed in to 'vim.select'
or 'vim.input'. It must return either nil or config values to use in place of the global
config values for that module.

View file

@ -22,7 +22,7 @@ with lib;
"warn"
"run"
]
"null"
null
''
Decides what to do when a key which doesn't belong to any head is pressed
- `null`: hydra exits and foreign key behaves normally, as if the hydra wasn't active
@ -37,14 +37,14 @@ with lib;
buffer = helpers.defaultNullOpts.mkNullable (
with types; either (enum [ true ]) ints.unsigned
) "null" "Define a hydra for the given buffer, pass `true` for current buf.";
) null "Define a hydra for the given buffer, pass `true` for current buf.";
invoke_on_body = helpers.defaultNullOpts.mkBool false ''
When true, summon the hydra after pressing only the `body` keys.
Normally a head is required.
'';
desc = helpers.defaultNullOpts.mkStr "null" ''
desc = helpers.defaultNullOpts.mkStr null ''
Description used for the body keymap when `invoke_on_body` is true.
When nil, "[Hydra] .. name" is used.
'';

View file

@ -51,7 +51,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
"warn"
"error"
]
"null"
null
''
Log messages at or above this level.
'';

View file

@ -20,7 +20,7 @@ in
while opening the folded line, `0` value will disable the highlight
'';
providerSelector = helpers.defaultNullOpts.mkLuaFn "null" ''
providerSelector = helpers.defaultNullOpts.mkLuaFn null ''
A lua function as a selector for fold providers.
'';
@ -31,7 +31,7 @@ in
run `UfoInspect` for details if your provider has extended the kinds.
'';
foldVirtTextHandler = helpers.defaultNullOpts.mkLuaFn "null" "A lua function to customize fold virtual text";
foldVirtTextHandler = helpers.defaultNullOpts.mkLuaFn null "A lua function to customize fold virtual text";
enableGetFoldVirtText = helpers.defaultNullOpts.mkBool false ''
Enable a function with `lnum` as a parameter to capture the virtual text

View file

@ -49,7 +49,7 @@ in
"warn"
"error"
]
"null"
null
''
Log messages at or above this level.
'';