Skip to content

Commit

Permalink
plugins/alpha: Allow terminal to not set val (nix-community#1261)
Browse files Browse the repository at this point in the history
  • Loading branch information
traxys authored Mar 13, 2024
1 parent 6484938 commit 9b99120
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
13 changes: 6 additions & 7 deletions plugins/utils/alpha.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ with lib; let
description = "Type of section";
};

val = mkOption {
type = with helpers.nixvimTypes;
oneOf [
val =
helpers.mkNullOrOption
(with helpers.nixvimTypes;
nullOr (oneOf [
# "button", "text"
str
# "padding"
Expand All @@ -36,10 +37,8 @@ with lib; let
# "group"
(attrsOf anything)
))
];
default = null;
description = "Value for section";
};
]))
"Value for section";

opts = mkOption {
type = with types; attrsOf anything;
Expand Down
17 changes: 17 additions & 0 deletions tests/test-sources/plugins/utils/alpha.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,23 @@
};
};

terminal = {
plugins.alpha = {
enable = true;
layout = [
{
type = "terminal";
command = "thisisfine";
width = 46;
height = 25;
opts = {
redraw = true;
};
}
];
};
};

custom-layout = {
plugins.alpha = {
enable = true;
Expand Down

0 comments on commit 9b99120

Please sign in to comment.