mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
lib/types: allow assigning raw lua to string lua
Relax the check a little to allow (slightly) incorrect usage and enable migrating option types to string lua types.
This commit is contained in:
parent
2d063c2c24
commit
36b4a39b2b
1 changed files with 3 additions and 2 deletions
|
@ -9,12 +9,13 @@ let
|
||||||
name = "str";
|
name = "str";
|
||||||
inherit description;
|
inherit description;
|
||||||
descriptionClass = "noun";
|
descriptionClass = "noun";
|
||||||
check = lib.isString;
|
check = v: isString v || isRawType v;
|
||||||
merge = lib.options.mergeEqualOption;
|
merge = lib.options.mergeEqualOption;
|
||||||
};
|
};
|
||||||
|
isRawType = v: v ? __raw && isString v.__raw;
|
||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
isRawType = v: v ? __raw && isString v.__raw;
|
inherit isRawType;
|
||||||
|
|
||||||
rawLua = mkOptionType {
|
rawLua = mkOptionType {
|
||||||
name = "rawLua";
|
name = "rawLua";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue