mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-03 09:36:10 +02:00
added formatter + reformat existing codebase (#175)
This commit is contained in:
parent
0bf4313f22
commit
264de8cefb
96 changed files with 3727 additions and 3341 deletions
|
@ -1,10 +1,13 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.plugins.lightline;
|
||||
helpers = import ../helpers.nix { inherit lib; };
|
||||
in
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.plugins.lightline;
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
in {
|
||||
options = {
|
||||
plugins.lightline = {
|
||||
enable = mkEnableOption "lightline";
|
||||
|
@ -51,23 +54,21 @@ in
|
|||
active = mkOption {
|
||||
default = null;
|
||||
type = types.nullOr (types.submodule {
|
||||
options =
|
||||
let
|
||||
listType = with types; nullOr (listOf (listOf str));
|
||||
in
|
||||
{
|
||||
left = mkOption {
|
||||
type = listType;
|
||||
description = "List of components that will show up on the left side of the bar";
|
||||
default = null;
|
||||
};
|
||||
|
||||
right = mkOption {
|
||||
type = listType;
|
||||
description = "List of components that will show up on the right side of the bar";
|
||||
default = null;
|
||||
};
|
||||
options = let
|
||||
listType = with types; nullOr (listOf (listOf str));
|
||||
in {
|
||||
left = mkOption {
|
||||
type = listType;
|
||||
description = "List of components that will show up on the left side of the bar";
|
||||
default = null;
|
||||
};
|
||||
|
||||
right = mkOption {
|
||||
type = listType;
|
||||
description = "List of components that will show up on the right side of the bar";
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -79,14 +80,13 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
config =
|
||||
let
|
||||
configAttrs = filterAttrs (_: v: v != null) {
|
||||
inherit (cfg) colorscheme active component componentFunction modeMap;
|
||||
};
|
||||
in
|
||||
config = let
|
||||
configAttrs = filterAttrs (_: v: v != null) {
|
||||
inherit (cfg) colorscheme active 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