lualine: fix null not being default

This commit is contained in:
Pedro Alves 2021-12-11 14:55:05 +00:00
parent 6cdfa0b4d8
commit 0116bf3f60

View file

@ -4,7 +4,7 @@ let
cfg = config.programs.nixvim.plugins.lualine; cfg = config.programs.nixvim.plugins.lualine;
helpers = import ../helpers.nix { lib = lib; }; helpers = import ../helpers.nix { lib = lib; };
separators = mkOption { separators = mkOption {
type = types.submodule { type = types.nullOr (types.submodule {
options = { options = {
left = mkOption { left = mkOption {
default = " "; default = " ";
@ -17,12 +17,12 @@ let
description = "right separator"; description = "right separator";
}; };
}; };
}; });
default = { }; default = null;
}; };
component_options = mode: component_options = mode:
mkOption { mkOption {
type = types.submodule { type = types.nullOr (types.submodule {
options = { options = {
mode = mkOption { mode = mkOption {
type = types.str; type = types.str;
@ -40,8 +40,8 @@ let
}; };
separator = separators; separator = separators;
}; };
}; });
default = { }; default = null;
}; };
in { in {
options = { options = {
@ -49,8 +49,8 @@ in {
enable = mkEnableOption "Enable lualine"; enable = mkEnableOption "Enable lualine";
theme = mkOption { theme = mkOption {
default = "auto"; default = null;
type = types.str; type = types.nullOr types.str;
description = "The theme to use for lualine-nvim."; description = "The theme to use for lualine-nvim.";
}; };
@ -58,15 +58,15 @@ in {
componentSeparators = separators; componentSeparators = separators;
disabledFiletypes = mkOption { disabledFiletypes = mkOption {
type = types.listOf types.str; type = types.nullOr (types.listOf types.str);
default = [ ]; default = null;
example = ''[ "lua" ]''; example = ''[ "lua" ]'';
description = "filetypes to disable lualine on"; description = "filetypes to disable lualine on";
}; };
alwaysDivideMiddle = mkOption { alwaysDivideMiddle = mkOption {
type = types.bool; type = types.nullOr types.bool;
default = true; default = null;
description = description =
"When true, left_sections (a,b,c) can't take over entire statusline"; "When true, left_sections (a,b,c) can't take over entire statusline";
}; };
@ -84,7 +84,7 @@ in {
}; };
})); }));
default = { }; default = null;
}; };
tabline = mkOption { tabline = mkOption {
@ -102,8 +102,8 @@ in {
default = null; default = null;
}; };
extensions = mkOption { extensions = mkOption {
type = types.listOf types.str; type = types.nullOr (types.listOf types.str);
default = [ ]; default = null;
example = ''[ "fzf" ]''; example = ''[ "fzf" ]'';
description = "list of enabled extensions"; description = "list of enabled extensions";
}; };