mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-24 17:58:38 +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
|
||||
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 = {
|
||||
fill = "fill";
|
||||
background = "background";
|
||||
|
@ -275,7 +263,12 @@ in {
|
|||
highlights =
|
||||
genAttrs
|
||||
(attrValues highlightOptions)
|
||||
(name: highlightOption);
|
||||
(
|
||||
name:
|
||||
helpers.mkNullOrOption helpers.nixvimTypes.highlight ''
|
||||
Highlight group definition for ${name}.
|
||||
''
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -343,16 +336,8 @@ in {
|
|||
highlights =
|
||||
mapAttrs
|
||||
(
|
||||
pluginOptionName: nixvimOptionName: {
|
||||
inherit
|
||||
(cfg.highlights.${nixvimOptionName})
|
||||
fg
|
||||
bg
|
||||
sp
|
||||
bold
|
||||
italic
|
||||
;
|
||||
}
|
||||
pluginOptionName: nixvimOptionName:
|
||||
cfg.highlights.${nixvimOptionName}
|
||||
)
|
||||
highlightOptions;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue