specs: add color option (#76)

This commit is contained in:
*Kim Zick 2022-11-27 16:55:34 -05:00 committed by GitHub
parent f9cfb250e9
commit 8678094511
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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})
'';