mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-25 02:08:40 +02:00
plugins/bufferline: use nixvimTypes.highlight
This commit is contained in:
parent
f88ff0a82e
commit
0e52776433
1 changed files with 8 additions and 23 deletions
|
@ -8,18 +8,6 @@
|
||||||
with lib; let
|
with lib; let
|
||||||
cfg = config.plugins.bufferline;
|
cfg = config.plugins.bufferline;
|
||||||
|
|
||||||
highlightOption = {
|
|
||||||
fg = helpers.mkNullOrOption types.str "foreground color";
|
|
||||||
|
|
||||||
bg = helpers.mkNullOrOption types.str "background color";
|
|
||||||
|
|
||||||
sp = helpers.mkNullOrOption types.str "sp color";
|
|
||||||
|
|
||||||
bold = helpers.mkNullOrOption types.bool "enable bold";
|
|
||||||
|
|
||||||
italic = helpers.mkNullOrOption types.bool "enable italic";
|
|
||||||
};
|
|
||||||
|
|
||||||
highlightOptions = {
|
highlightOptions = {
|
||||||
fill = "fill";
|
fill = "fill";
|
||||||
background = "background";
|
background = "background";
|
||||||
|
@ -275,7 +263,12 @@ in {
|
||||||
highlights =
|
highlights =
|
||||||
genAttrs
|
genAttrs
|
||||||
(attrValues highlightOptions)
|
(attrValues highlightOptions)
|
||||||
(name: highlightOption);
|
(
|
||||||
|
name:
|
||||||
|
helpers.mkNullOrOption helpers.nixvimTypes.highlight ''
|
||||||
|
Highlight group definition for ${name}.
|
||||||
|
''
|
||||||
|
);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -343,16 +336,8 @@ in {
|
||||||
highlights =
|
highlights =
|
||||||
mapAttrs
|
mapAttrs
|
||||||
(
|
(
|
||||||
pluginOptionName: nixvimOptionName: {
|
pluginOptionName: nixvimOptionName:
|
||||||
inherit
|
cfg.highlights.${nixvimOptionName}
|
||||||
(cfg.highlights.${nixvimOptionName})
|
|
||||||
fg
|
|
||||||
bg
|
|
||||||
sp
|
|
||||||
bold
|
|
||||||
italic
|
|
||||||
;
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
highlightOptions;
|
highlightOptions;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue