From cf037458ddc16f1b0d037630546760ecad0231c3 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Tue, 28 May 2024 21:24:19 +0200 Subject: [PATCH] colorschemes/nightfox: add flavor option --- plugins/colorschemes/nightfox.nix | 19 +++++++++++++++++++ .../plugins/colorschemes/nightfox.nix | 3 ++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/plugins/colorschemes/nightfox.nix b/plugins/colorschemes/nightfox.nix index 8554f345..4923315c 100644 --- a/plugins/colorschemes/nightfox.nix +++ b/plugins/colorschemes/nightfox.nix @@ -14,6 +14,25 @@ helpers.neovim-plugin.mkNeovimPlugin config { maintainers = [ maintainers.GaetanLepage ]; + colorscheme = null; + extraOptions = { + flavor = mkOption { + type = types.enum [ + "carbonfox" + "dawnfox" + "dayfox" + "duskfox" + "nightfox" + "nordfox" + "terafox" + ]; + example = "dayfox"; + default = "nightfox"; + description = "Which palette/flavor to use as the colorscheme."; + }; + }; + extraConfig = cfg: { colorscheme = mkDefault cfg.flavor; }; + settingsOptions = { options = { compile_path = helpers.defaultNullOpts.mkStr ''{__raw = "vim.fn.stdpath('cache') .. '/nightfox'";}'' '' diff --git a/tests/test-sources/plugins/colorschemes/nightfox.nix b/tests/test-sources/plugins/colorschemes/nightfox.nix index 63eda51f..9ad3a922 100644 --- a/tests/test-sources/plugins/colorschemes/nightfox.nix +++ b/tests/test-sources/plugins/colorschemes/nightfox.nix @@ -9,7 +9,6 @@ settings = { options = { - compile_path.__raw = "vim.fn.stdpath('cache') .. '/nightfox'"; compile_file_suffix = "_compiled"; transparent = false; @@ -74,6 +73,8 @@ colorschemes.nightfox = { enable = true; + flavor = "dayfox"; + settings = { options = { transparent = true;