mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-29 22:30:13 +02:00
helpers: Add helpers to make nullable enums with default values
This commit is contained in:
parent
eada2a76db
commit
52350c1786
1 changed files with 2 additions and 0 deletions
|
@ -88,6 +88,8 @@ rec {
|
|||
mkInt = default: mkNullable lib.types.int (toString default);
|
||||
mkBool = default: mkNullable lib.types.bool (if default then "true" else "false");
|
||||
mkStr = default: mkNullable lib.types.str ''"${default}"'';
|
||||
mkEnum = enum: default: mkNullable (lib.types.enum enum) ''"${default}"'';
|
||||
mkEnumFirstDefault = enum: mkEnum enum (head enum);
|
||||
};
|
||||
|
||||
mkPlugin = { config, lib, ... }: { name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue