Skip to content

Commit

Permalink
statusline/feline: add components
Browse files Browse the repository at this point in the history
  • Loading branch information
NotAShelf committed Jan 10, 2025
1 parent 970af58 commit b3b8d3a
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions modules/plugins/statusline/feline/feline.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
}: let
inherit (builtins) elem;
inherit (lib.options) mkOption mkEnableOption literalExpression;
inherit (lib.types) str listOf attrsOf anything either submodule;
inherit (lib.types) str listOf attrs attrsOf anything either submodule;
inherit (lib.lists) optional;
inherit (lib.generators) mkLuaInline;
inherit (lib.nvim.types) mkPluginSetupOption;
Expand Down Expand Up @@ -119,10 +119,25 @@ in {
mode using `require('feline.providers.vi_mode').get_mode_color()`.
See `:help feline-vi-mode` for more details on vi mode.
'';
};

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

'';
inactive = mkOption {
type = listOf (listOf (attrsOf anything));
default = [];
description = "List of components to display for buffers feline will render as 'inactive'";
};
};
};
};
Expand Down

0 comments on commit b3b8d3a

Please sign in to comment.