plugins/nvim-tree: fix option types

This commit is contained in:
Gaetan Lepage 2023-10-09 15:51:31 +02:00 committed by Gaétan Lepage
parent eab342e2bb
commit 0d8da0fcfb

View file

@ -373,24 +373,29 @@ in {
width = width =
helpers.defaultNullOpts.mkNullable helpers.defaultNullOpts.mkNullable
(types.oneOf [ (with types;
types.str oneOf [
types.int str
(types.submodule { int
options = let (submodule {
strOrInt = types.either types.str types.int; options = let
in { strOrInt = either str int;
min = helpers.defaultNullOpts.mkNullable strOrInt "30" "Minimum dynamic width."; in {
# TODO check type
min = helpers.defaultNullOpts.mkNullable strOrInt "30" "Minimum dynamic width.";
max = helpers.defaultNullOpts.mkNullable strOrInt "-1" '' max = helpers.defaultNullOpts.mkNullable strOrInt "-1" ''
Maximum dynamic width, -1 for unbounded. Maximum dynamic width, -1 for unbounded.
''; '';
padding = helpers.defaultNullOpts.mkNullable strOrInt "1" ''
Extra padding to the right. padding =
''; helpers.defaultNullOpts.mkNullable
}; (either ints.unsigned helpers.rawType)
}) "1"
]) "Extra padding to the right.";
};
})
])
"30" "30"
'' ''
Width of the window: can be a `%` string, a number representing columns or a table. Width of the window: can be a `%` string, a number representing columns or a table.