diff --git a/modules/plugins/theme/config.nix b/modules/plugins/theme/config.nix index f6544b3..6c414a0 100644 --- a/modules/plugins/theme/config.nix +++ b/modules/plugins/theme/config.nix @@ -5,7 +5,7 @@ in { vim.theme = { enable = mkDefault false; name = mkDefault "onedark"; - style = mkDefault "darker"; + # style = mkDefault "darker"; transparent = mkDefault false; extraConfig = mkDefault ""; }; diff --git a/modules/plugins/theme/supported-themes.nix b/modules/plugins/theme/supported-themes.nix index e2f3783..2e2dbce 100644 --- a/modules/plugins/theme/supported-themes.nix +++ b/modules/plugins/theme/supported-themes.nix @@ -11,7 +11,6 @@ cfg = config.vim.theme; mkEnableOption' = name: mkEnableOption name // {default = true;}; - numbers = ["0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "A" "B" "C" "D" "E" "F"]; base16Options = listToAttrs (map (n: { name = "base0${n}"; diff --git a/modules/plugins/theme/theme.nix b/modules/plugins/theme/theme.nix index 06da3a1..373d20d 100644 --- a/modules/plugins/theme/theme.nix +++ b/modules/plugins/theme/theme.nix @@ -10,12 +10,16 @@ inherit (lib.modules) mkIf; inherit (lib.nvim.dag) entryBefore; inherit (lib.nvim.lua) toLuaObject; + cfg = config.vim.theme; supportedThemes = import ./supported-themes.nix { inherit lib config; }; in { options.vim.theme = { + themes = supportedThemes; + inherit (supportedThemes.${cfg.name}) setupOpts; + enable = mkOption { type = bool; description = "Enable theming"; @@ -28,9 +32,6 @@ in { requires all of the colors in {option}`vim.theme.base16-colors` to be set. ''; }; - setupOpts = cfg.themes.${cfg.name}.setupOpts; - themes = supportedThemes; - style = mkOption { type = enum supportedThemes.${cfg.name}.styles; default = elemAt supportedThemes.${cfg.name}.styles 0; @@ -59,7 +60,7 @@ in { luaConfigRC.theme = entryBefore ["pluginConfigs"] '' ${cfg.extraConfig} - require('${name'}').setup(${toLuaObject cfg.themes.${cfg.name}.setupOpts}) + require('${name'}').setup(${toLuaObject cfg.setupOpts}) ${supportedThemes.${cfg.name}.setup} '';