mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-28 19:40:06 +02:00
colorschemes/base16: move to dedicated folder
This commit is contained in:
parent
4ab65ca95a
commit
4fd3cd1203
3 changed files with 2 additions and 2 deletions
112
plugins/colorschemes/base16/default.nix
Normal file
112
plugins/colorschemes/base16/default.nix
Normal file
|
@ -0,0 +1,112 @@
|
|||
{
|
||||
lib,
|
||||
helpers,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.colorschemes.base16;
|
||||
themes = import ./theme-list.nix;
|
||||
in {
|
||||
options = {
|
||||
colorschemes.base16 = {
|
||||
enable = mkEnableOption "base16";
|
||||
|
||||
package = helpers.mkPackageOption "base16" pkgs.vimPlugins.base16-nvim;
|
||||
|
||||
useTruecolor = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Whether to use truecolor for the colorschemes. If set to false, you'll need to set up base16 in your shell.";
|
||||
};
|
||||
|
||||
colorscheme = mkOption {
|
||||
type = types.nullOr (types.enum themes);
|
||||
description = "The base16 colorscheme to use";
|
||||
default = null;
|
||||
};
|
||||
|
||||
setUpBar = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Whether to install the matching plugin for your statusbar. This does nothing as of yet, waiting for upstream support.";
|
||||
};
|
||||
|
||||
customColorScheme =
|
||||
helpers.mkNullOrOption
|
||||
(with types;
|
||||
submodule {
|
||||
options =
|
||||
listToAttrs
|
||||
(
|
||||
map
|
||||
(
|
||||
colorId: rec {
|
||||
name = "base0" + colorId;
|
||||
value = mkOption {
|
||||
type = types.str;
|
||||
description = "The value for color ${name}.";
|
||||
example = "#16161D";
|
||||
};
|
||||
}
|
||||
)
|
||||
["0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "A" "B" "C" "D" "E" "F"]
|
||||
);
|
||||
})
|
||||
''
|
||||
Optionally, you can provide a table specifying your colors to the setup function.
|
||||
|
||||
Example:
|
||||
```nix
|
||||
{
|
||||
base00 = "#16161D";
|
||||
base01 = "#2c313c";
|
||||
base02 = "#3e4451";
|
||||
base03 = "#6c7891";
|
||||
base04 = "#565c64";
|
||||
base05 = "#abb2bf";
|
||||
base06 = "#9a9bb3";
|
||||
base07 = "#c5c8e6";
|
||||
base08 = "#e06c75";
|
||||
base09 = "#d19a66";
|
||||
base0A = "#e5c07b";
|
||||
base0B = "#98c379";
|
||||
base0C = "#56b6c2";
|
||||
base0D = "#0184bc";
|
||||
base0E = "#c678dd";
|
||||
base0F = "#a06949";
|
||||
}
|
||||
```
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
warnings = optional (cfg.colorscheme != null && cfg.customColorScheme != null) "
|
||||
You have set both `colorschemes.base16.colorscheme` and `colorschemes.base16.customColorScheme`, `colorscheme` will be preferred.
|
||||
";
|
||||
assertions = [
|
||||
{
|
||||
assertion = cfg.colorscheme != null || cfg.customColorScheme != null;
|
||||
message = ''
|
||||
You have enabled `colorschemes.base16` but haven't set a specific color scheme.
|
||||
Please set a color scheme using `colorschemes.base16.colorscheme` or `colorschemes.base16.customColorScheme`.
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
colorscheme = mkIf (cfg.colorscheme != null) "base16-${cfg.colorscheme}";
|
||||
extraPlugins = [cfg.package];
|
||||
|
||||
plugins.airline.settings.theme = mkIf cfg.setUpBar "base16";
|
||||
plugins.lualine.theme = mkIf cfg.setUpBar "base16";
|
||||
plugins.lightline.colorscheme = null;
|
||||
|
||||
options.termguicolors = mkIf cfg.useTruecolor true;
|
||||
|
||||
extraConfigLuaPre = mkIf (cfg.customColorScheme != null) ''
|
||||
require('base16-colorscheme').setup(${helpers.toLuaObject cfg.customColorScheme})
|
||||
'';
|
||||
};
|
||||
}
|
243
plugins/colorschemes/base16/theme-list.nix
Normal file
243
plugins/colorschemes/base16/theme-list.nix
Normal file
|
@ -0,0 +1,243 @@
|
|||
# This is a list of all base16 themes
|
||||
[
|
||||
"3024"
|
||||
"apathy"
|
||||
"apprentice"
|
||||
"ashes"
|
||||
"atelier-cave"
|
||||
"atelier-cave-light"
|
||||
"atelier-dune"
|
||||
"atelier-dune-light"
|
||||
"atelier-estuary"
|
||||
"atelier-estuary-light"
|
||||
"atelier-forest"
|
||||
"atelier-forest-light"
|
||||
"atelier-heath"
|
||||
"atelier-heath-light"
|
||||
"atelier-lakeside"
|
||||
"atelier-lakeside-light"
|
||||
"atelier-plateau"
|
||||
"atelier-plateau-light"
|
||||
"atelier-savanna"
|
||||
"atelier-savanna-light"
|
||||
"atelier-seaside"
|
||||
"atelier-seaside-light"
|
||||
"atelier-sulphurpool"
|
||||
"atelier-sulphurpool-light"
|
||||
"atlas"
|
||||
"ayu-dark"
|
||||
"ayu-light"
|
||||
"ayu-mirage"
|
||||
"bespin"
|
||||
"black-metal"
|
||||
"black-metal-bathory"
|
||||
"black-metal-burzum"
|
||||
"black-metal-dark-funeral"
|
||||
"black-metal-gorgoroth"
|
||||
"black-metal-immortal"
|
||||
"black-metal-khold"
|
||||
"black-metal-marduk"
|
||||
"black-metal-mayhem"
|
||||
"black-metal-nile"
|
||||
"black-metal-venom"
|
||||
"blueforest"
|
||||
"blueish"
|
||||
"brewer"
|
||||
"bright"
|
||||
"brogrammer"
|
||||
"brushtrees"
|
||||
"brushtrees-dark"
|
||||
"catppuccin"
|
||||
"catppuccin-frappe"
|
||||
"catppuccin-latte"
|
||||
"catppuccin-macchiato"
|
||||
"catppuccin-mocha"
|
||||
"chalk"
|
||||
"circus"
|
||||
"classic-dark"
|
||||
"classic-light"
|
||||
"codeschool"
|
||||
"colors"
|
||||
"cupcake"
|
||||
"cupertino"
|
||||
"da-one-black"
|
||||
"da-one-gray"
|
||||
"da-one-ocean"
|
||||
"da-one-paper"
|
||||
"da-one-sea"
|
||||
"da-one-white"
|
||||
"danqing"
|
||||
"darcula"
|
||||
"darkmoss"
|
||||
"darktooth"
|
||||
"darkviolet"
|
||||
"decaf"
|
||||
"default-dark"
|
||||
"default-light"
|
||||
"dirtysea"
|
||||
"dracula"
|
||||
"edge-dark"
|
||||
"edge-light"
|
||||
"eighties"
|
||||
"embers"
|
||||
"emil"
|
||||
"equilibrium-dark"
|
||||
"equilibrium-gray-dark"
|
||||
"equilibrium-gray-light"
|
||||
"equilibrium-light"
|
||||
"espresso"
|
||||
"eva"
|
||||
"eva-dim"
|
||||
"evenok-dark"
|
||||
"everforest"
|
||||
"flat"
|
||||
"framer"
|
||||
"fruit-soda"
|
||||
"gigavolt"
|
||||
"github"
|
||||
"google-dark"
|
||||
"google-light"
|
||||
"gotham"
|
||||
"grayscale-dark"
|
||||
"grayscale-light"
|
||||
"greenscreen"
|
||||
"gruber"
|
||||
"gruvbox-dark-hard"
|
||||
"gruvbox-dark-medium"
|
||||
"gruvbox-dark-pale"
|
||||
"gruvbox-dark-soft"
|
||||
"gruvbox-light-hard"
|
||||
"gruvbox-light-medium"
|
||||
"gruvbox-light-soft"
|
||||
"gruvbox-material-dark-hard"
|
||||
"gruvbox-material-dark-medium"
|
||||
"gruvbox-material-dark-soft"
|
||||
"gruvbox-material-light-hard"
|
||||
"gruvbox-material-light-medium"
|
||||
"gruvbox-material-light-soft"
|
||||
"hardcore"
|
||||
"harmonic-dark"
|
||||
"harmonic-light"
|
||||
"heetch"
|
||||
"heetch-light"
|
||||
"helios"
|
||||
"hopscotch"
|
||||
"horizon-dark"
|
||||
"horizon-light"
|
||||
"horizon-terminal-dark"
|
||||
"horizon-terminal-light"
|
||||
"humanoid-dark"
|
||||
"humanoid-light"
|
||||
"ia-dark"
|
||||
"ia-light"
|
||||
"icy"
|
||||
"irblack"
|
||||
"isotope"
|
||||
"kanagawa"
|
||||
"katy"
|
||||
"kimber"
|
||||
"lime"
|
||||
"macintosh"
|
||||
"marrakesh"
|
||||
"materia"
|
||||
"material"
|
||||
"material-darker"
|
||||
"material-lighter"
|
||||
"material-palenight"
|
||||
"material-vivid"
|
||||
"mellow-purple"
|
||||
"mexico-light"
|
||||
"mocha"
|
||||
"monokai"
|
||||
"mountain"
|
||||
"nebula"
|
||||
"nord"
|
||||
"nova"
|
||||
"ocean"
|
||||
"oceanicnext"
|
||||
"one-light"
|
||||
"onedark"
|
||||
"outrun-dark"
|
||||
"pandora"
|
||||
"papercolor-dark"
|
||||
"papercolor-light"
|
||||
"paraiso"
|
||||
"pasque"
|
||||
"phd"
|
||||
"pico"
|
||||
"pinky"
|
||||
"pop"
|
||||
"porple"
|
||||
"primer-dark"
|
||||
"primer-dark-dimmed"
|
||||
"primer-light"
|
||||
"purpledream"
|
||||
"qualia"
|
||||
"railscasts"
|
||||
"rebecca"
|
||||
"rose-pine"
|
||||
"rose-pine-dawn"
|
||||
"rose-pine-moon"
|
||||
"sagelight"
|
||||
"sakura"
|
||||
"sandcastle"
|
||||
"seti"
|
||||
"shades-of-purple"
|
||||
"shadesmear-dark"
|
||||
"shadesmear-light"
|
||||
"shapeshifter"
|
||||
"silk-dark"
|
||||
"silk-light"
|
||||
"snazzy"
|
||||
"solarflare"
|
||||
"solarflare-light"
|
||||
"solarized-dark"
|
||||
"solarized-light"
|
||||
"spaceduck"
|
||||
"spacemacs"
|
||||
"standardized-dark"
|
||||
"standardized-light"
|
||||
"stella"
|
||||
"still-alive"
|
||||
"summercamp"
|
||||
"summerfruit-dark"
|
||||
"summerfruit-light"
|
||||
"synth-midnight-dark"
|
||||
"synth-midnight-light"
|
||||
"tango"
|
||||
"tender"
|
||||
"tokyo-city-dark"
|
||||
"tokyo-city-light"
|
||||
"tokyo-city-terminal-dark"
|
||||
"tokyo-city-terminal-light"
|
||||
"tokyo-night-dark"
|
||||
"tokyo-night-light"
|
||||
"tokyo-night-storm"
|
||||
"tokyo-night-terminal-dark"
|
||||
"tokyo-night-terminal-light"
|
||||
"tokyo-night-terminal-storm"
|
||||
"tokyodark"
|
||||
"tokyodark-terminal"
|
||||
"tomorrow"
|
||||
"tomorrow-night"
|
||||
"tomorrow-night-eighties"
|
||||
"tube"
|
||||
"twilight"
|
||||
"unikitty-dark"
|
||||
"unikitty-light"
|
||||
"unikitty-reversible"
|
||||
"uwunicorn"
|
||||
"vice"
|
||||
"vulcan"
|
||||
"windows-10"
|
||||
"windows-10-light"
|
||||
"windows-95"
|
||||
"windows-95-light"
|
||||
"windows-highcontrast"
|
||||
"windows-highcontrast-light"
|
||||
"windows-nt"
|
||||
"windows-nt-light"
|
||||
"woodland"
|
||||
"xcode-dusk"
|
||||
"zenburn"
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue