mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-26 07:06:44 +00:00
statusline/lualine: Move helper to lib
This commit is contained in:
parent
11a974a111
commit
2a809a64ff
3 changed files with 27 additions and 25 deletions
|
@ -44,4 +44,6 @@
|
|||
)
|
||||
)
|
||||
+ " }";
|
||||
# Convert a list of lua expressions to a lua table. The difference to listToLuaTable is that the elements here are expected to be lua expressions already, whereas listToLuaTable converts from nix types to lua first
|
||||
luaTable = items: ''{${builtins.concatStringsSep "," items}}'';
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
}:
|
||||
with lib; let
|
||||
cfg = config.vim.statusline.lualine;
|
||||
luaTable = items: ''{${builtins.concatStringsSep "," items}}'';
|
||||
inherit (nvim.lua) luaTable;
|
||||
in {
|
||||
config = (mkIf cfg.enable) {
|
||||
vim.startPlugins = [
|
||||
|
|
|
@ -117,7 +117,7 @@ in {
|
|||
|
||||
activeSection = {
|
||||
a = mkOption {
|
||||
type = types.listOf types.str;
|
||||
type = with types; listOf str;
|
||||
description = "active config for: | (A) | B | C X | Y | Z |";
|
||||
default = [
|
||||
''
|
||||
|
@ -134,7 +134,7 @@ in {
|
|||
};
|
||||
|
||||
b = mkOption {
|
||||
type = types.listOf types.str;
|
||||
type = with types; listOf str;
|
||||
description = "active config for: | A | (B) | C X | Y | Z |";
|
||||
default = [
|
||||
''
|
||||
|
@ -157,7 +157,7 @@ in {
|
|||
};
|
||||
|
||||
c = mkOption {
|
||||
type = types.listOf types.str;
|
||||
type = with types; listOf str;
|
||||
description = "active config for: | A | B | (C) X | Y | Z |";
|
||||
default = [
|
||||
''
|
||||
|
@ -181,7 +181,7 @@ in {
|
|||
};
|
||||
|
||||
x = mkOption {
|
||||
type = types.listOf types.str;
|
||||
type = with types; listOf str;
|
||||
description = "active config for: | A | B | C (X) | Y | Z |";
|
||||
default = [
|
||||
''
|
||||
|
@ -239,7 +239,7 @@ in {
|
|||
};
|
||||
|
||||
y = mkOption {
|
||||
type = types.listOf types.str;
|
||||
type = with types; listOf str;
|
||||
description = "active config for: | A | B | C X | (Y) | Z |";
|
||||
default = [
|
||||
''
|
||||
|
@ -261,7 +261,7 @@ in {
|
|||
};
|
||||
|
||||
z = mkOption {
|
||||
type = types.listOf types.str;
|
||||
type = with types; listOf str;
|
||||
description = "active config for: | A | B | C X | Y | (Z) |";
|
||||
default = [
|
||||
''
|
||||
|
@ -293,32 +293,32 @@ in {
|
|||
};
|
||||
extraActiveSection = {
|
||||
a = mkOption {
|
||||
type = types.listOf types.str;
|
||||
type = with types; listOf str;
|
||||
description = "Extra entries for activeSection.a";
|
||||
default = [];
|
||||
};
|
||||
b = mkOption {
|
||||
type = types.listOf types.str;
|
||||
type = with types; listOf str;
|
||||
description = "Extra entries for activeSection.b";
|
||||
default = [];
|
||||
};
|
||||
c = mkOption {
|
||||
type = types.listOf types.str;
|
||||
type = with types; listOf str;
|
||||
description = "Extra entries for activeSection.c";
|
||||
default = [];
|
||||
};
|
||||
x = mkOption {
|
||||
type = types.listOf types.str;
|
||||
type = with types; listOf str;
|
||||
description = "Extra entries for activeSection.x";
|
||||
default = [];
|
||||
};
|
||||
y = mkOption {
|
||||
type = types.listOf types.str;
|
||||
type = with types; listOf str;
|
||||
description = "Extra entries for activeSection.y";
|
||||
default = [];
|
||||
};
|
||||
z = mkOption {
|
||||
type = types.listOf types.str;
|
||||
type = with types; listOf str;
|
||||
description = "Extra entries for activeSection.z";
|
||||
default = [];
|
||||
};
|
||||
|
@ -326,69 +326,69 @@ in {
|
|||
|
||||
inactiveSection = {
|
||||
a = mkOption {
|
||||
type = types.listOf types.str;
|
||||
type = with types; listOf str;
|
||||
description = "inactive config for: | (A) | B | C X | Y | Z |";
|
||||
default = [];
|
||||
};
|
||||
|
||||
b = mkOption {
|
||||
type = types.listOf types.str;
|
||||
type = with types; listOf str;
|
||||
description = "inactive config for: | A | (B) | C X | Y | Z |";
|
||||
default = [];
|
||||
};
|
||||
|
||||
c = mkOption {
|
||||
type = types.listOf types.str;
|
||||
type = with types; listOf str;
|
||||
description = "inactive config for: | A | B | (C) X | Y | Z |";
|
||||
default = ["'filename'"];
|
||||
};
|
||||
|
||||
x = mkOption {
|
||||
type = types.listOf types.str;
|
||||
type = with types; listOf str;
|
||||
description = "inactive config for: | A | B | C (X) | Y | Z |";
|
||||
default = ["'location'"];
|
||||
};
|
||||
|
||||
y = mkOption {
|
||||
type = types.listOf types.str;
|
||||
type = with types; listOf str;
|
||||
description = "inactive config for: | A | B | C X | (Y) | Z |";
|
||||
default = [];
|
||||
};
|
||||
|
||||
z = mkOption {
|
||||
type = types.listOf types.str;
|
||||
type = with types; listOf str;
|
||||
description = "inactive config for: | A | B | C X | Y | (Z) |";
|
||||
default = [];
|
||||
};
|
||||
};
|
||||
extraInactiveSection = {
|
||||
a = mkOption {
|
||||
type = types.listOf types.str;
|
||||
type = with types; listOf str;
|
||||
description = "Extra entries for inactiveSection.a";
|
||||
default = [];
|
||||
};
|
||||
b = mkOption {
|
||||
type = types.listOf types.str;
|
||||
type = with types; listOf str;
|
||||
description = "Extra entries for inactiveSection.b";
|
||||
default = [];
|
||||
};
|
||||
c = mkOption {
|
||||
type = types.listOf types.str;
|
||||
type = with types; listOf str;
|
||||
description = "Extra entries for inactiveSection.c";
|
||||
default = [];
|
||||
};
|
||||
x = mkOption {
|
||||
type = types.listOf types.str;
|
||||
type = with types; listOf str;
|
||||
description = "Extra entries for inactiveSection.x";
|
||||
default = [];
|
||||
};
|
||||
y = mkOption {
|
||||
type = types.listOf types.str;
|
||||
type = with types; listOf str;
|
||||
description = "Extra entries for inactiveSection.y";
|
||||
default = [];
|
||||
};
|
||||
z = mkOption {
|
||||
type = types.listOf types.str;
|
||||
type = with types; listOf str;
|
||||
description = "Extra entries for inactiveSection.z";
|
||||
default = [];
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue