mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-19 10:59:49 +01:00
colorizer: allow null for all options
This commit is contained in:
parent
2c37513012
commit
981fe07075
1 changed files with 49 additions and 10 deletions
|
@ -4,20 +4,59 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib.options) mkOption mkEnableOption;
|
inherit (lib.options) mkOption mkEnableOption;
|
||||||
inherit (lib.types) attrsOf enum nullOr submodule;
|
inherit (lib.types) attrsOf enum nullOr submodule bool;
|
||||||
inherit (lib.modules) mkRenamedOptionModule;
|
inherit (lib.modules) mkRenamedOptionModule;
|
||||||
inherit (lib.nvim.config) mkBool;
|
|
||||||
|
|
||||||
settingSubmodule = submodule {
|
settingSubmodule = submodule {
|
||||||
options = {
|
options = {
|
||||||
RGB = mkBool true "Colorize #RGB hex codes";
|
RGB = mkOption {
|
||||||
RRGGBB = mkBool true "Colorize #RRGGBB hex codes";
|
description = "Colorize #RGB hex codes";
|
||||||
names = mkBool true ''Colorize "Name" codes like Blue'';
|
default = null;
|
||||||
RRGGBBAA = mkBool false "Colorize #RRGGBBAA hex codes";
|
type = nullOr bool;
|
||||||
rgb_fn = mkBool false "Colorize CSS rgb() and rgba() functions";
|
};
|
||||||
hsl_fn = mkBool false "Colorize CSS hsl() and hsla() functions";
|
|
||||||
css = mkBool false "Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB";
|
RRGGBB = mkOption {
|
||||||
css_fn = mkBool false "Enable all CSS *functions*: rgb_fn, hsl_fn";
|
description = "Colorize #RRGGBB hex codes";
|
||||||
|
default = null;
|
||||||
|
type = nullOr bool;
|
||||||
|
};
|
||||||
|
|
||||||
|
names = mkOption {
|
||||||
|
description = ''Colorize "Name" codes like Blue'';
|
||||||
|
default = null;
|
||||||
|
type = nullOr bool;
|
||||||
|
};
|
||||||
|
|
||||||
|
RRGGBBAA = mkOption {
|
||||||
|
description = "Colorize #RRGGBBAA hex codes";
|
||||||
|
default = null;
|
||||||
|
type = nullOr bool;
|
||||||
|
};
|
||||||
|
|
||||||
|
rgb_fn = mkOption {
|
||||||
|
description = "Colorize CSS rgb() and rgba() functions";
|
||||||
|
default = null;
|
||||||
|
type = nullOr bool;
|
||||||
|
};
|
||||||
|
|
||||||
|
hsl_fn = mkOption {
|
||||||
|
description = "Colorize CSS hsl() and hsla() functions";
|
||||||
|
default = null;
|
||||||
|
type = nullOr bool;
|
||||||
|
};
|
||||||
|
|
||||||
|
css = mkOption {
|
||||||
|
description = "Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB";
|
||||||
|
default = null;
|
||||||
|
type = nullOr bool;
|
||||||
|
};
|
||||||
|
|
||||||
|
css_fn = mkOption {
|
||||||
|
description = "Enable all CSS *functions*: rgb_fn, hsl_fn";
|
||||||
|
default = null;
|
||||||
|
type = nullOr bool;
|
||||||
|
};
|
||||||
|
|
||||||
mode = mkOption {
|
mode = mkOption {
|
||||||
description = "Set the display mode";
|
description = "Set the display mode";
|
||||||
type = nullOr (enum ["foreground" "background"]);
|
type = nullOr (enum ["foreground" "background"]);
|
||||||
|
|
Loading…
Reference in a new issue