plugins/lightline: Add option for inactive components (#1170)

This commit is contained in:
Dyson 2024-03-03 18:21:19 +00:00 committed by GitHub
parent 64d3996bd0
commit 7dcd217ff3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -72,6 +72,19 @@ in {
}); });
}; };
inactive = mkOption {
default = null;
type = types.nullOr (types.submodule {
options = let
listType = with helpers.nixvimTypes; maybeRaw (listOf (listOf str));
in {
left = helpers.mkNullOrOption listType "List of components that will show up on the left side of the bar";
right = helpers.mkNullOrOption listType "List of components that will show up on the right side of the bar";
};
});
};
modeMap = mkOption { modeMap = mkOption {
type = with types; nullOr (attrsOf str); type = with types; nullOr (attrsOf str);
description = "Mode name mappings"; description = "Mode name mappings";
@ -82,7 +95,7 @@ in {
config = let config = let
configAttrs = filterAttrs (_: v: v != null) { configAttrs = filterAttrs (_: v: v != null) {
inherit (cfg) colorscheme active component componentFunction modeMap; inherit (cfg) colorscheme active inactive component componentFunction modeMap;
}; };
in in
mkIf cfg.enable { mkIf cfg.enable {