From 867809451164b0080cb57b646914360761dbfbe7 Mon Sep 17 00:00:00 2001 From: *Kim Zick Date: Sun, 27 Nov 2022 16:55:34 -0500 Subject: [PATCH] specs: add color option (#76) --- plugins/utils/specs.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/utils/specs.nix b/plugins/utils/specs.nix index 5edd292d..9ebd3cb6 100644 --- a/plugins/utils/specs.nix +++ b/plugins/utils/specs.nix @@ -35,6 +35,11 @@ in default = 10; }; + color = mkOption { + type = types.nullOr types.str; + default = null; + }; + width = mkOption { type = types.int; default = 10; @@ -117,6 +122,7 @@ in cfg.ignored_buffertypes); popup = { inherit (cfg) blend width; + winhl = if (!isNull cfg.color) then "SpecsPopColor" else "PMenu"; delay_ms = cfg.delay; inc_ms = cfg.increment; fader = helpers.mkRaw (if cfg.fader.builtin == null then @@ -133,6 +139,8 @@ in mkIf cfg.enable { extraPlugins = [ pkgs.vimPlugins.specs-nvim ]; + highlight.SpecsPopColor.bg = mkIf (!isNull cfg.color) cfg.color; + extraConfigLua = '' require('specs').setup(${setup}) '';