mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-12-17 09:21:19 +00:00
modules: add base16 Theming support
theme/theme.nix: fix formatting supported-themes.nix: formatting clean up base16-colors.nix theme: fix plugin setup, change base16 flake input
This commit is contained in:
parent
c727528b6f
commit
e80dedd098
7 changed files with 126 additions and 6 deletions
|
|
@ -7,9 +7,11 @@
|
|||
typesPlugin = import ./plugins.nix {inherit inputs lib;};
|
||||
typesLanguage = import ./languages.nix {inherit lib;};
|
||||
typesCustom = import ./custom.nix {inherit lib;};
|
||||
typesTheme = import ./theme.nix {inherit lib;};
|
||||
in {
|
||||
inherit (typesDag) dagOf;
|
||||
inherit (typesPlugin) pluginsOpt extraPluginType mkPluginSetupOption luaInline pluginType borderType;
|
||||
inherit (typesLanguage) diagnostics mkGrammarOption;
|
||||
inherit (typesCustom) anythingConcatLists char;
|
||||
inherit (typesTheme) hexColorType;
|
||||
}
|
||||
|
|
|
|||
13
lib/types/theme.nix
Normal file
13
lib/types/theme.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{lib}: let
|
||||
inherit (lib.strings) isString hasPrefix;
|
||||
inherit (lib.types) mkOptionType;
|
||||
inherit (builtins) stringLength;
|
||||
# This was almost entirely taken from raf himself.
|
||||
in {
|
||||
hexColorType = mkOptionType {
|
||||
name = "hex-color";
|
||||
descriptionClass = "noun";
|
||||
description = "RGB color in hex format";
|
||||
check = x: isString x && hasPrefix "#" x && stringLength x == 7;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue