mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
lib/options: add defaultNullOpts.mkFloat
This commit is contained in:
parent
24ac8f651d
commit
91227dca9e
3 changed files with 4 additions and 2 deletions
|
@ -167,6 +167,8 @@ rec {
|
||||||
|
|
||||||
mkNum' = args: mkNullableWithRaw' (args // { type = types.number; });
|
mkNum' = args: mkNullableWithRaw' (args // { type = types.number; });
|
||||||
mkNum = pluginDefault: description: mkNum' { inherit pluginDefault description; };
|
mkNum = pluginDefault: description: mkNum' { inherit pluginDefault description; };
|
||||||
|
mkFloat' = args: mkNullableWithRaw' (args // { type = types.float; });
|
||||||
|
mkFloat = pluginDefault: description: mkFloat' { inherit pluginDefault description; };
|
||||||
mkProportion' = args: mkNullableWithRaw' (args // { type = types.numbers.between 0.0 1.0; });
|
mkProportion' = args: mkNullableWithRaw' (args // { type = types.numbers.between 0.0 1.0; });
|
||||||
mkProportion = pluginDefault: description: mkProportion' { inherit pluginDefault description; };
|
mkProportion = pluginDefault: description: mkProportion' { inherit pluginDefault description; };
|
||||||
mkInt' = args: mkNullableWithRaw' (args // { type = types.int; });
|
mkInt' = args: mkNullableWithRaw' (args // { type = types.int; });
|
||||||
|
|
|
@ -181,7 +181,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
float_precision = defaultNullOpts.mkNullable types.float 0.01 ''
|
float_precision = defaultNullOpts.mkFloat 0.01 ''
|
||||||
Can limit the number of decimals displayed for floats.
|
Can limit the number of decimals displayed for floats.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
@ -52,7 +52,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
as allowing this plugin to provide logical defaults for a "batteries included" experience.
|
as allowing this plugin to provide logical defaults for a "batteries included" experience.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
max_file_size = defaultNullOpts.mkNullable types.float 10.0 ''
|
max_file_size = defaultNullOpts.mkFloat 10.0 ''
|
||||||
The maximum file size that this plugin will attempt to render in megabytes.
|
The maximum file size that this plugin will attempt to render in megabytes.
|
||||||
|
|
||||||
This plugin only does rendering for what is visible within the viewport so the size of the
|
This plugin only does rendering for what is visible within the viewport so the size of the
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue