mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-26 18:58:43 +02:00
gitsigns: use nullable options (#148)
* helpers: Correctly print bool values as true/false * helpers: Add helpers to make nullable enums with default values * gitsigns: Refactor to use nullable options
This commit is contained in:
parent
66b1b099cf
commit
b9a5c9c2b5
2 changed files with 133 additions and 171 deletions
|
@ -86,8 +86,10 @@ rec {
|
|||
);
|
||||
|
||||
mkInt = default: mkNullable lib.types.int (toString default);
|
||||
mkBool = default: mkNullable lib.types.bool (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