bufferline: change options

This commit is contained in:
Builditluc 2021-11-24 16:29:42 +01:00 committed by Pedro Alves
parent 11386608b7
commit 1562144db5

View file

@ -27,133 +27,133 @@ in
programs.nixvim.plugins.bufferline = { programs.nixvim.plugins.bufferline = {
enable = mkEnableOption "Enable bufferline"; enable = mkEnableOption "Enable bufferline";
numbers = mkOption { numbers = mkOption {
type = types.lines; type = types.nullOr types.lines;
description = "A lua function customizing the styling of numbers."; description = "A lua function customizing the styling of numbers.";
default = ""; default = null;
}; };
closeCommand = mkOption { closeCommand = mkOption {
type = types.lines; type = types.nullOr types.lines;
description = "Command or function run when closing a buffer."; description = "Command or function run when closing a buffer.";
default = ""; default = null;
}; };
rightMouseCommand = mkOption { rightMouseCommand = mkOption {
type = types.lines; type = types.nullOr types.lines;
description = "Command or function run when right clicking on a buffer."; description = "Command or function run when right clicking on a buffer.";
default = ""; default = null;
}; };
leftMouseCommand = mkOption { leftMouseCommand = mkOption {
type = types.lines; type = types.nullOr types.lines;
description = "Command or function run when clicking on a buffer."; description = "Command or function run when clicking on a buffer.";
default = ""; default = null;
}; };
middleMouseCommand = mkOption { middleMouseCommand = mkOption {
type = types.lines; type = types.nullOr types.lines;
description = "Command or function run when middle clicking on a buffer."; description = "Command or function run when middle clicking on a buffer.";
default = ""; default = null;
}; };
indicatorIcon = mkOption { indicatorIcon = mkOption {
type = types.str; type = types.nullOr types.str;
description = "The Icon shown as a indicator for buffer. Changing it is NOT recommended, description = "The Icon shown as a indicator for buffer. Changing it is NOT recommended,
this is intended to be an escape hatch for people who cannot bear it for whatever reason."; this is intended to be an escape hatch for people who cannot bear it for whatever reason.";
default = ""; default = null;
}; };
bufferCloseIcon = mkOption { bufferCloseIcon = mkOption {
type = types.str; type = types.nullOr types.str;
description = "The close icon for each buffer."; description = "The close icon for each buffer.";
default = ""; default = null;
}; };
modifiedIcon = mkOption { modifiedIcon = mkOption {
type = types.str; type = types.nullOr types.str;
description = "The icon indicating a buffer was modified."; description = "The icon indicating a buffer was modified.";
default = ""; default = null;
}; };
closeIcon = mkOption { closeIcon = mkOption {
type = types.str; type = types.nullOr types.str;
description = "The close icon."; description = "The close icon.";
default = ""; default = null;
}; };
leftTruncMarker = mkOption { leftTruncMarker = mkOption {
type = types.str; type = types.nullOr types.str;
default = ""; default = null;
}; };
rightTruncMarker = mkOption { rightTruncMarker = mkOption {
type = types.str; type = types.nullOr types.str;
default = ""; default = null;
}; };
nameFormatter = mkOption { nameFormatter = mkOption {
type = types.lines; type = types.nullOr types.lines;
description = "A lua function that can be used to modify the buffer's lable. The argument 'buf' containing a name, path and bufnr is supplied."; description = "A lua function that can be used to modify the buffer's lable. The argument 'buf' containing a name, path and bufnr is supplied.";
default = ""; default = null;
}; };
maxNameLength = mkOption { maxNameLength = mkOption {
type = types.int; type = types.nullOr types.int;
description = "Max length of a buffer name."; description = "Max length of a buffer name.";
default = 18; default = null;
}; };
maxPrefixLength = mkOption { maxPrefixLength = mkOption {
type = types.int; type = types.nullOr types.int;
description = "Max length of a buffer prefix (used when a buffer is de-duplicated)"; description = "Max length of a buffer prefix (used when a buffer is de-duplicated)";
default = 15; default = null;
}; };
tabSize = mkOption { tabSize = mkOption {
type = types.int; type = types.nullOr types.int;
description = "Size of the tabs"; description = "Size of the tabs";
default = 18; default = null;
}; };
diagnostics = mkOption { diagnostics = mkOption {
type = types.enum [ false "nvim_lsp" "coc" ]; type = types.nullOr (types.enum [ false "nvim_lsp" "coc" ]);
default = false; default = null;
}; };
diagnosticsUpdateInInsert = mkOption { diagnosticsUpdateInInsert = mkOption {
type = types.bool; type = types.nullOr types.bool;
default = false; default = null;
}; };
diagnosticsIndicator = mkOption { diagnosticsIndicator = mkOption {
type = types.lines; type = types.nullOr types.lines;
default = ""; default = null;
}; };
customFilter = mkOption { customFilter = mkOption {
type = types.lines; type = types.nullOr types.lines;
default = ""; default = null;
}; };
showBufferIcons = mkOption { showBufferIcons = mkOption {
type = types.bool; type = types.nullOr types.bool;
default = true; default = null;
}; };
showBufferCloseIcons = mkOption { showBufferCloseIcons = mkOption {
type = types.bool; type = types.nullOr types.bool;
default = true; default = null;
}; };
showCloseIcon = mkOption { showCloseIcon = mkOption {
type = types.bool; type = types.nullOr types.bool;
default = true; default = null;
}; };
showTabIndicators = mkOption { showTabIndicators = mkOption {
type = types.bool; type = types.nullOr types.bool;
default = true; default = null;
}; };
persistBufferSort = mkOption { persistBufferSort = mkOption {
type = types.bool; type = types.nullOr types.bool;
default = true; default = null;
}; };
separatorStyle = mkOption { separatorStyle = mkOption {
type = types.enum [ "slant" "thick" "thin" ]; type = types.nullOr (types.enum [ "slant" "thick" "thin" ]);
default = "slant"; default = null;
}; };
enforceRegularTabs = mkOption { enforceRegularTabs = mkOption {
type = types.bool; type = types.nullOr types.bool;
default = false; default = null;
}; };
alwaysShowBufferline = mkOption { alwaysShowBufferline = mkOption {
type = types.bool; type = types.nullOr types.bool;
default = true; default = null;
}; };
sortBy = mkOption { sortBy = mkOption {
type = types.enum [ "id" "extension" "relative_directory" "directory" "tabs" ]; type = types.nullOr (types.enum [ "id" "extension" "relative_directory" "directory" "tabs" ]);
default = "id"; default = null;
}; };
highlights = mkOption { highlights = mkOption {
type = types.submodule { type = types.nullOr (types.submodule ({...}: {
options = { options = {
fill = highlight; fill = highlight;
background = highlight; background = highlight;
@ -215,7 +215,7 @@ in
pickVisible = highlight; pickVisible = highlight;
pickSelected = highlight; pickSelected = highlight;
}; };
}; }));
}; };
}; };
}; };