mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-30 23:55:15 +02:00
treewide: Reformat with nixfmt
This commit is contained in:
parent
c6281260dc
commit
62f32bfc71
459 changed files with 28139 additions and 26377 deletions
|
@ -5,9 +5,11 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
with lib;
|
||||
let
|
||||
cfg = config.plugins.lightline;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
plugins.lightline = {
|
||||
enable = mkEnableOption "lightline";
|
||||
|
@ -53,28 +55,36 @@ in {
|
|||
|
||||
active = mkOption {
|
||||
default = null;
|
||||
type = types.nullOr (types.submodule {
|
||||
options = let
|
||||
listType = with helpers.nixvimTypes; maybeRaw (listOf (listOf str));
|
||||
in {
|
||||
left = helpers.mkNullOrOption listType "List of components that will show up on the left side of the bar";
|
||||
type = types.nullOr (
|
||||
types.submodule {
|
||||
options =
|
||||
let
|
||||
listType = with helpers.nixvimTypes; maybeRaw (listOf (listOf str));
|
||||
in
|
||||
{
|
||||
left = helpers.mkNullOrOption listType "List of components that will show up on the left side of the bar";
|
||||
|
||||
right = helpers.mkNullOrOption listType "List of components that will show up on the right side of the bar";
|
||||
};
|
||||
});
|
||||
right = helpers.mkNullOrOption listType "List of components that will show up on the right side of the bar";
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
inactive = mkOption {
|
||||
default = null;
|
||||
type = types.nullOr (types.submodule {
|
||||
options = let
|
||||
listType = with helpers.nixvimTypes; maybeRaw (listOf (listOf str));
|
||||
in {
|
||||
left = helpers.mkNullOrOption listType "List of components that will show up on the left side of the bar";
|
||||
type = types.nullOr (
|
||||
types.submodule {
|
||||
options =
|
||||
let
|
||||
listType = with helpers.nixvimTypes; maybeRaw (listOf (listOf str));
|
||||
in
|
||||
{
|
||||
left = helpers.mkNullOrOption listType "List of components that will show up on the left side of the bar";
|
||||
|
||||
right = helpers.mkNullOrOption listType "List of components that will show up on the right side of the bar";
|
||||
};
|
||||
});
|
||||
right = helpers.mkNullOrOption listType "List of components that will show up on the right side of the bar";
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
modeMap = mkOption {
|
||||
|
@ -85,13 +95,21 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
config = let
|
||||
configAttrs = filterAttrs (_: v: v != null) {
|
||||
inherit (cfg) colorscheme active inactive component componentFunction modeMap;
|
||||
};
|
||||
in
|
||||
config =
|
||||
let
|
||||
configAttrs = filterAttrs (_: v: v != null) {
|
||||
inherit (cfg)
|
||||
colorscheme
|
||||
active
|
||||
inactive
|
||||
component
|
||||
componentFunction
|
||||
modeMap
|
||||
;
|
||||
};
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
extraPlugins = [cfg.package];
|
||||
globals.lightline = mkIf (configAttrs != {}) configAttrs;
|
||||
extraPlugins = [ cfg.package ];
|
||||
globals.lightline = mkIf (configAttrs != { }) configAttrs;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue