mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +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;
|
||||
};
|
||||
|
||||
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})
|
||||
'';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue