mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-22 08:53:28 +02:00
specs: add color option (#76)
This commit is contained in:
parent
f9cfb250e9
commit
8678094511
1 changed files with 8 additions and 0 deletions
|
@ -35,6 +35,11 @@ in
|
||||||
default = 10;
|
default = 10;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
color = mkOption {
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
|
|
||||||
width = mkOption {
|
width = mkOption {
|
||||||
type = types.int;
|
type = types.int;
|
||||||
default = 10;
|
default = 10;
|
||||||
|
@ -117,6 +122,7 @@ in
|
||||||
cfg.ignored_buffertypes);
|
cfg.ignored_buffertypes);
|
||||||
popup = {
|
popup = {
|
||||||
inherit (cfg) blend width;
|
inherit (cfg) blend width;
|
||||||
|
winhl = if (!isNull cfg.color) then "SpecsPopColor" else "PMenu";
|
||||||
delay_ms = cfg.delay;
|
delay_ms = cfg.delay;
|
||||||
inc_ms = cfg.increment;
|
inc_ms = cfg.increment;
|
||||||
fader = helpers.mkRaw (if cfg.fader.builtin == null then
|
fader = helpers.mkRaw (if cfg.fader.builtin == null then
|
||||||
|
@ -133,6 +139,8 @@ in
|
||||||
mkIf cfg.enable {
|
mkIf cfg.enable {
|
||||||
extraPlugins = [ pkgs.vimPlugins.specs-nvim ];
|
extraPlugins = [ pkgs.vimPlugins.specs-nvim ];
|
||||||
|
|
||||||
|
highlight.SpecsPopColor.bg = mkIf (!isNull cfg.color) cfg.color;
|
||||||
|
|
||||||
extraConfigLua = ''
|
extraConfigLua = ''
|
||||||
require('specs').setup(${setup})
|
require('specs').setup(${setup})
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue