mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-23 01:08:43 +02:00
feat: change to use attributes
This commit is contained in:
parent
935dcfb02e
commit
a24f6279a6
1 changed files with 6 additions and 2 deletions
|
@ -36,7 +36,7 @@ with lib; let
|
||||||
Enables the display of icons alongside the component.
|
Enables the display of icons alongside the component.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
icon = helpers.mkNullOrOption (types.either types.str helpers.rawType) ''
|
icon = helpers.mkNullOrOption (with types; either str (attrsOf anything)) ''
|
||||||
Defines the icon to be displayed in front of the component.
|
Defines the icon to be displayed in front of the component.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -211,7 +211,11 @@ in {
|
||||||
mergeAttrs
|
mergeAttrs
|
||||||
{
|
{
|
||||||
"__unkeyed" = name;
|
"__unkeyed" = name;
|
||||||
inherit icons_enabled icon separator color padding;
|
icon =
|
||||||
|
if isAttrs icon
|
||||||
|
then removeAttrs (icon // {"__unkeyed" = icon.icon;}) ["icon"]
|
||||||
|
else icon;
|
||||||
|
inherit icons_enabled separator color padding;
|
||||||
}
|
}
|
||||||
extraConfig;
|
extraConfig;
|
||||||
processSections = mapAttrs (_: mapNullable (map processComponent));
|
processSections = mapAttrs (_: mapNullable (map processComponent));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue