Skip to content

Commit 77f52f7

Browse files
committed
statusline/feline: add components
1 parent 970af58 commit 77f52f7

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

modules/plugins/statusline/feline/feline.nix

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
}: let
66
inherit (builtins) elem;
77
inherit (lib.options) mkOption mkEnableOption literalExpression;
8-
inherit (lib.types) str listOf attrsOf anything either submodule;
8+
inherit (lib.types) str listOf attrs attrsOf anything either submodule;
99
inherit (lib.lists) optional;
1010
inherit (lib.generators) mkLuaInline;
1111
inherit (lib.nvim.types) mkPluginSetupOption;
@@ -119,10 +119,25 @@ in {
119119
mode using `require('feline.providers.vi_mode').get_mode_color()`.
120120
121121
See `:help feline-vi-mode` for more details on vi mode.
122+
'';
123+
};
122124

125+
# TODO:
126+
# - Check for the number of elements in the list maybe? Can Feline have infinite components per section?
127+
# - type-check contents of `attrsOf anything`? Is there a downside for not doing that?
128+
# - add examples for each one of those components. The option types are necessary, but confusing.
129+
compontents = {
130+
active = mkOption {
131+
type = listOf (listOf (attrsOf anything));
132+
default = [];
133+
description = "List of components to display for buffers feline will render as 'active'";
134+
};
123135

124-
125-
'';
136+
inactive = mkOption {
137+
type = listOf (listOf (attrsOf anything));
138+
default = [];
139+
description = "List of components to display for buffers feline will render as 'inactive'";
140+
};
126141
};
127142
};
128143
};

0 commit comments

Comments
 (0)