plugins/alpha: Allow terminal to not set val (#1261)

Fixes #1140
This commit is contained in:
traxys 2024-03-13 17:31:46 +01:00 committed by GitHub
parent 6484938d4b
commit 9b9912077e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 23 additions and 7 deletions

View file

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

View file

@ -13,6 +13,23 @@
}; };
}; };
terminal = {
plugins.alpha = {
enable = true;
layout = [
{
type = "terminal";
command = "thisisfine";
width = 46;
height = 25;
opts = {
redraw = true;
};
}
];
};
};
custom-layout = { custom-layout = {
plugins.alpha = { plugins.alpha = {
enable = true; enable = true;