mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-19 12:09:48 +01:00
dev: provide empty defaults
This commit is contained in:
parent
745088159c
commit
452e5475e1
2 changed files with 158 additions and 213 deletions
|
@ -76,8 +76,8 @@ in {
|
||||||
},
|
},
|
||||||
|
|
||||||
severity = {
|
severity = {
|
||||||
min = "vim.diagnostic.severity.${cfg.diagnostics.severity.min}",
|
min = vim.diagnostic.severity.${cfg.diagnostics.severity.min},
|
||||||
max = "vim.diagnostic.severity.${cfg.diagnostics.severity.max}",
|
max = vim.diagnostic.severity.${cfg.diagnostics.severity.max},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,45 @@ with builtins; {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
updateFocusedFile = mkOption {
|
||||||
|
description = ''
|
||||||
|
Update the focused file on `BufEnter`, un-collapses the folders recursively
|
||||||
|
until it finds the file.
|
||||||
|
'';
|
||||||
|
default = {};
|
||||||
|
type = types.submodule {
|
||||||
|
options = {
|
||||||
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "update focused file";
|
||||||
|
};
|
||||||
|
|
||||||
|
updateRoot = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Update the root directory of the tree if the file is not under current
|
||||||
|
root directory. It prefers vim's cwd and `root_dirs`.
|
||||||
|
Otherwise it falls back to the folder containing the file.
|
||||||
|
Only relevant when `update_focused_file.enable` is `true`
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
ignoreList = mkOption {
|
||||||
|
type = with types; listOf str;
|
||||||
|
default = [];
|
||||||
|
description = ''
|
||||||
|
List of buffer names and filetypes that will not update the root dir
|
||||||
|
of the tree if the file isn't found under the current root directory.
|
||||||
|
Only relevant when `update_focused_file.update_root` and
|
||||||
|
`update_focused_file.enable` are `true`.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
sort = {
|
sort = {
|
||||||
# TODO: function as a possible type
|
# TODO: function as a possible type
|
||||||
sorter = mkOption {
|
sorter = mkOption {
|
||||||
|
@ -144,38 +183,6 @@ with builtins; {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
updateFocusedFile = mkOption {
|
|
||||||
description = ''
|
|
||||||
Update the focused file on `BufEnter`, un-collapses the folders recursively
|
|
||||||
until it finds the file.
|
|
||||||
'';
|
|
||||||
default = {};
|
|
||||||
|
|
||||||
type = types.submodule {
|
|
||||||
options = {
|
|
||||||
enable = mkEnableOption "update focused file";
|
|
||||||
|
|
||||||
updateRoot = mkEnableOption ''
|
|
||||||
Update the root directory of the tree if the file is not under current
|
|
||||||
root directory. It prefers vim's cwd and `root_dirs`.
|
|
||||||
Otherwise it falls back to the folder containing the file.
|
|
||||||
Only relevant when `update_focused_file.enable` is `true`
|
|
||||||
'';
|
|
||||||
|
|
||||||
ignoreList = mkOption {
|
|
||||||
description = ''
|
|
||||||
List of buffer names and filetypes that will not update the root dir
|
|
||||||
of the tree if the file isn't found under the current root directory.
|
|
||||||
Only relevant when `update_focused_file.update_root` and
|
|
||||||
`update_focused_file.enable` are `true`.
|
|
||||||
'';
|
|
||||||
type = with types; listOf str;
|
|
||||||
default = [];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systemOpen = {
|
systemOpen = {
|
||||||
args = mkOption {
|
args = mkOption {
|
||||||
default = [];
|
default = [];
|
||||||
|
@ -196,12 +203,7 @@ with builtins; {
|
||||||
Note that the modified sign will take precedence over the diagnostics signs.
|
Note that the modified sign will take precedence over the diagnostics signs.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
default = {
|
default = {};
|
||||||
enable = false;
|
|
||||||
debounceDelay = 50;
|
|
||||||
showOnDirs = false;
|
|
||||||
showOnOpenDirs = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
|
@ -210,13 +212,17 @@ with builtins; {
|
||||||
debounceDelay = mkOption {
|
debounceDelay = mkOption {
|
||||||
description = "Idle milliseconds between diagnostic event and update.";
|
description = "Idle milliseconds between diagnostic event and update.";
|
||||||
type = types.int;
|
type = types.int;
|
||||||
|
default = 50;
|
||||||
};
|
};
|
||||||
|
|
||||||
showOnDirs = mkOption {
|
showOnDirs = mkOption {
|
||||||
description = "Show diagnostic icons on parent directories.";
|
description = "Show diagnostic icons on parent directories.";
|
||||||
|
default = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
showOnOpenDirs = mkOption {
|
showOnOpenDirs = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
description = ''
|
description = ''
|
||||||
Show diagnostics icons on directories that are open.
|
Show diagnostics icons on directories that are open.
|
||||||
Only relevant when `diagnostics.show_on_dirs` is `true`.
|
Only relevant when `diagnostics.show_on_dirs` is `true`.
|
||||||
|
@ -225,30 +231,28 @@ with builtins; {
|
||||||
|
|
||||||
icons = mkOption {
|
icons = mkOption {
|
||||||
description = "Icons for diagnostic severity.";
|
description = "Icons for diagnostic severity.";
|
||||||
default = {
|
default = {};
|
||||||
hint = "";
|
|
||||||
info = "";
|
|
||||||
warning = "";
|
|
||||||
error = "";
|
|
||||||
};
|
|
||||||
|
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
hint = mkOption {
|
hint = mkOption {
|
||||||
description = "Icon used for `hint` diagnostic.";
|
description = "Icon used for `hint` diagnostic.";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
|
default = "";
|
||||||
};
|
};
|
||||||
info = mkOption {
|
info = mkOption {
|
||||||
description = "Icon used for `info` diagnostic.";
|
description = "Icon used for `info` diagnostic.";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
|
default = "";
|
||||||
};
|
};
|
||||||
warning = mkOption {
|
warning = mkOption {
|
||||||
description = "Icon used for `warning` diagnostic.";
|
description = "Icon used for `warning` diagnostic.";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
|
default = "";
|
||||||
};
|
};
|
||||||
error = mkOption {
|
error = mkOption {
|
||||||
description = "Icon used for `error` diagnostic.";
|
description = "Icon used for `error` diagnostic.";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
|
default = "";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -256,22 +260,19 @@ with builtins; {
|
||||||
|
|
||||||
severity = mkOption {
|
severity = mkOption {
|
||||||
description = "Severity for which the diagnostics will be displayed. See `:help diagnostic-severity`";
|
description = "Severity for which the diagnostics will be displayed. See `:help diagnostic-severity`";
|
||||||
|
default = {};
|
||||||
default = {
|
|
||||||
min = "HINT";
|
|
||||||
max = "ERROR";
|
|
||||||
};
|
|
||||||
|
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
min = mkOption {
|
min = mkOption {
|
||||||
description = "Minimum severity.";
|
description = "Minimum severity.";
|
||||||
type = types.enum ["HINT" "INFO" "WARNING" "ERROR"];
|
type = types.enum ["HINT" "INFO" "WARNING" "ERROR"];
|
||||||
|
default = "HINT";
|
||||||
};
|
};
|
||||||
|
|
||||||
max = mkOption {
|
max = mkOption {
|
||||||
description = "Maximum severity.";
|
description = "Maximum severity.";
|
||||||
type = types.enum ["HINT" "INFO" "WARNING" "ERROR"];
|
type = types.enum ["HINT" "INFO" "WARNING" "ERROR"];
|
||||||
|
default = "ERROR";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -316,13 +317,7 @@ with builtins; {
|
||||||
|
|
||||||
modified = mkOption {
|
modified = mkOption {
|
||||||
description = "Indicate which file have unsaved modification.";
|
description = "Indicate which file have unsaved modification.";
|
||||||
|
default = {};
|
||||||
default = {
|
|
||||||
enable = false;
|
|
||||||
showOnDirs = true;
|
|
||||||
showOnOpenDirs = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
enable = mkEnableOption "Modified files with icons and color highlight.";
|
enable = mkEnableOption "Modified files with icons and color highlight.";
|
||||||
|
@ -330,11 +325,13 @@ with builtins; {
|
||||||
showOnDirs = mkOption {
|
showOnDirs = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
description = "Show modified icons on parent directories.";
|
description = "Show modified icons on parent directories.";
|
||||||
|
default = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
showOnOpenDirs = mkOption {
|
showOnOpenDirs = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
description = "Show modified icons on directories that are open.";
|
description = "Show modified icons on directories that are open.";
|
||||||
|
default = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -348,27 +345,24 @@ with builtins; {
|
||||||
updated only for the appropriate folder change, resulting in better
|
updated only for the appropriate folder change, resulting in better
|
||||||
performance.
|
performance.
|
||||||
'';
|
'';
|
||||||
|
default = {};
|
||||||
default = {
|
|
||||||
enable = true;
|
|
||||||
debounceDelay = 50;
|
|
||||||
ignoreDirs = [];
|
|
||||||
};
|
|
||||||
|
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
description = "Enable filesystem watchers.";
|
description = "Enable filesystem watchers.";
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
debounceDelay = mkOption {
|
debounceDelay = mkOption {
|
||||||
description = "Idle milliseconds between filesystem change and action.";
|
description = "Idle milliseconds between filesystem change and action.";
|
||||||
type = types.int;
|
type = types.int;
|
||||||
|
default = 50;
|
||||||
};
|
};
|
||||||
|
|
||||||
ignoreDirs = mkOption {
|
ignoreDirs = mkOption {
|
||||||
type = with types; listOf str;
|
type = with types; listOf str;
|
||||||
|
default = [];
|
||||||
description = ''
|
description = ''
|
||||||
List of vim regex for absolute directory paths that will not be watched.
|
List of vim regex for absolute directory paths that will not be watched.
|
||||||
Backslashes must be escaped e.g. `"my-project/\\.build$"`.
|
Backslashes must be escaped e.g. `"my-project/\\.build$"`.
|
||||||
|
@ -385,33 +379,24 @@ with builtins; {
|
||||||
|
|
||||||
view = mkOption {
|
view = mkOption {
|
||||||
description = "Window / buffer setup.";
|
description = "Window / buffer setup.";
|
||||||
|
default = {};
|
||||||
default = {
|
|
||||||
centralizeSelection = false;
|
|
||||||
cursorline = true;
|
|
||||||
debounceDelay = 15;
|
|
||||||
width = 30;
|
|
||||||
side = "left";
|
|
||||||
preserveWindowProportions = false;
|
|
||||||
number = false;
|
|
||||||
relativenumber = false;
|
|
||||||
signcolumn = "yes";
|
|
||||||
};
|
|
||||||
|
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
centralizeSelection = mkOption {
|
centralizeSelection = mkOption {
|
||||||
description = "If true, reposition the view so that the current node is initially centralized when entering nvim-tree.";
|
description = "If true, reposition the view so that the current node is initially centralized when entering nvim-tree.";
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
cursorline = mkOption {
|
cursorline = mkOption {
|
||||||
description = "Enable cursorline in nvim-tree window.";
|
description = "Enable cursorline in nvim-tree window.";
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
debounceDelay = mkOption {
|
debounceDelay = mkOption {
|
||||||
type = types.int;
|
type = types.int;
|
||||||
|
default = 15;
|
||||||
description = ''
|
description = ''
|
||||||
Idle milliseconds before some reload / refresh operations.
|
Idle milliseconds before some reload / refresh operations.
|
||||||
Increase if you experience performance issues around screen refresh.
|
Increase if you experience performance issues around screen refresh.
|
||||||
|
@ -427,6 +412,7 @@ with builtins; {
|
||||||
longest line.
|
longest line.
|
||||||
'';
|
'';
|
||||||
type = with types; oneOf [int attrs];
|
type = with types; oneOf [int attrs];
|
||||||
|
default = 30;
|
||||||
example = literalExpression ''
|
example = literalExpression ''
|
||||||
{
|
{
|
||||||
min = 30;
|
min = 30;
|
||||||
|
@ -439,6 +425,7 @@ with builtins; {
|
||||||
side = mkOption {
|
side = mkOption {
|
||||||
description = "Side of the tree.";
|
description = "Side of the tree.";
|
||||||
type = types.enum ["left" "right"];
|
type = types.enum ["left" "right"];
|
||||||
|
default = "left";
|
||||||
};
|
};
|
||||||
|
|
||||||
preserveWindowProportions = mkOption {
|
preserveWindowProportions = mkOption {
|
||||||
|
@ -447,11 +434,13 @@ with builtins; {
|
||||||
If `false`, the height and width of windows other than nvim-tree will be equalized.
|
If `false`, the height and width of windows other than nvim-tree will be equalized.
|
||||||
'';
|
'';
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
number = mkOption {
|
number = mkOption {
|
||||||
description = "Print the line number in front of each line.";
|
description = "Print the line number in front of each line.";
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
relativenumber = mkOption {
|
relativenumber = mkOption {
|
||||||
|
@ -461,44 +450,44 @@ with builtins; {
|
||||||
will be the line number instead of `0`.
|
will be the line number instead of `0`.
|
||||||
'';
|
'';
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
signcolumn = mkOption {
|
signcolumn = mkOption {
|
||||||
description = ''Show diagnostic sign column. Value can be `"yes"`, `"auto"` or`"no"`.'';
|
description = ''Show diagnostic sign column. Value can be `"yes"`, `"auto"` or`"no"`.'';
|
||||||
type = types.enum ["yes" "auto" "no"];
|
type = types.enum ["yes" "auto" "no"];
|
||||||
|
default = "yes";
|
||||||
};
|
};
|
||||||
|
|
||||||
float = mkOption {
|
float = mkOption {
|
||||||
description = "Configuration options for floating window.";
|
description = "Configuration options for floating window.";
|
||||||
|
|
||||||
default = {
|
default = {};
|
||||||
enable = false;
|
|
||||||
quitOnFocusLoss = true;
|
|
||||||
openWinConfig = {
|
|
||||||
relative = "editor";
|
|
||||||
border = "rounded";
|
|
||||||
width = 30;
|
|
||||||
height = 30;
|
|
||||||
row = 1;
|
|
||||||
col = 1;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
description = "If true, tree window will be floating.";
|
description = "If true, tree window will be floating.";
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
quitOnFocusLoss = mkOption {
|
quitOnFocusLoss = mkOption {
|
||||||
description = "Close the floating tree window when it loses focus.";
|
description = "Close the floating tree window when it loses focus.";
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
openWinConfig = mkOption {
|
openWinConfig = mkOption {
|
||||||
description = "Floating window config. See `:h nvim_open_win()` for more details.";
|
description = "Floating window config. See `:h nvim_open_win()` for more details.";
|
||||||
type = types.attrs;
|
type = types.attrs;
|
||||||
|
default = {
|
||||||
|
relative = "editor";
|
||||||
|
border = "rounded";
|
||||||
|
width = 30;
|
||||||
|
height = 30;
|
||||||
|
row = 1;
|
||||||
|
col = 1;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -579,17 +568,7 @@ with builtins; {
|
||||||
|
|
||||||
indentMarkers = mkOption {
|
indentMarkers = mkOption {
|
||||||
description = "Configuration options for tree indent markers.";
|
description = "Configuration options for tree indent markers.";
|
||||||
default = {
|
default = {};
|
||||||
inlineArrows = true;
|
|
||||||
icons = {
|
|
||||||
corner = "└";
|
|
||||||
edge = "│";
|
|
||||||
item = "│";
|
|
||||||
bottom = "─";
|
|
||||||
none = "";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
enable = mkEnableOption "Display indent markers when folders are open.";
|
enable = mkEnableOption "Display indent markers when folders are open.";
|
||||||
|
@ -627,61 +606,55 @@ with builtins; {
|
||||||
|
|
||||||
icons = mkOption {
|
icons = mkOption {
|
||||||
description = "Configuration options for icons.";
|
description = "Configuration options for icons.";
|
||||||
default = {
|
default = {};
|
||||||
webdevColors = true;
|
|
||||||
gitPlacement = "before";
|
|
||||||
modifiedPlacement = "after";
|
|
||||||
padding = " ";
|
|
||||||
symlinkArrow = " ➛ ";
|
|
||||||
show = {
|
|
||||||
file = true;
|
|
||||||
folder = true;
|
|
||||||
folderArrow = true;
|
|
||||||
git = false;
|
|
||||||
modified = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
webdevColors = mkOption {
|
webdevColors = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
description = " Use the webdev icon colors, otherwise `NvimTreeFileIcon`";
|
description = " Use the webdev icon colors, otherwise `NvimTreeFileIcon`";
|
||||||
|
default = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
gitPlacement = mkOption {
|
gitPlacement = mkOption {
|
||||||
type = types.enum ["before" "after" "signcolumn"];
|
type = types.enum ["before" "after" "signcolumn"];
|
||||||
description = "Place where the git icons will be rendered. `signcolumn` requires `view.signcolumn` to be enabled.";
|
description = "Place where the git icons will be rendered. `signcolumn` requires `view.signcolumn` to be enabled.";
|
||||||
|
default = "before";
|
||||||
};
|
};
|
||||||
|
|
||||||
modifiedPlacement = mkOption {
|
modifiedPlacement = mkOption {
|
||||||
type = types.enum ["before" "after" "signcolumn"];
|
type = types.enum ["before" "after" "signcolumn"];
|
||||||
description = "Place where the modified icons will be rendered. `signcolumn` requires `view.signcolumn` to be enabled.";
|
description = "Place where the modified icons will be rendered. `signcolumn` requires `view.signcolumn` to be enabled.";
|
||||||
|
default = "after";
|
||||||
};
|
};
|
||||||
|
|
||||||
padding = mkOption {
|
padding = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
description = "Inserted between icon and filename";
|
description = "Inserted between icon and filename";
|
||||||
|
default = " ";
|
||||||
};
|
};
|
||||||
|
|
||||||
symlinkArrow = mkOption {
|
symlinkArrow = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
description = "Used as a separator between symlinks' source and target.";
|
description = "Used as a separator between symlinks' source and target.";
|
||||||
|
default = " ➛ ";
|
||||||
};
|
};
|
||||||
|
|
||||||
show = {
|
show = {
|
||||||
file = mkOption {
|
file = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
description = "Show an icon before the file name. `nvim-web-devicons` will be used if available.";
|
description = "Show an icon before the file name. `nvim-web-devicons` will be used if available.";
|
||||||
|
default = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
folder = mkOption {
|
folder = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
description = "Show an icon before the folder name.";
|
description = "Show an icon before the folder name.";
|
||||||
|
default = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
folderArrow = mkOption {
|
folderArrow = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
description = ''
|
description = ''
|
||||||
Show a small arrow before the folder node. Arrow will be a part of the
|
Show a small arrow before the folder node. Arrow will be a part of the
|
||||||
node when using `renderer.indent_markers`.
|
node when using `renderer.indent_markers`.
|
||||||
|
@ -690,6 +663,7 @@ with builtins; {
|
||||||
|
|
||||||
git = mkOption {
|
git = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Show a git status icon, see `renderer.icons.gitPlacement`
|
Show a git status icon, see `renderer.icons.gitPlacement`
|
||||||
Requires `git.enable` to be true.
|
Requires `git.enable` to be true.
|
||||||
|
@ -711,59 +685,55 @@ with builtins; {
|
||||||
NOTE: Do not set any glyphs to more than two characters if it's going
|
NOTE: Do not set any glyphs to more than two characters if it's going
|
||||||
to appear in the signcolumn.
|
to appear in the signcolumn.
|
||||||
'';
|
'';
|
||||||
|
default = {};
|
||||||
default = {
|
|
||||||
default = "";
|
|
||||||
symlink = "";
|
|
||||||
modified = "";
|
|
||||||
folder = {
|
|
||||||
default = "";
|
|
||||||
open = "";
|
|
||||||
arrowOpen = "";
|
|
||||||
arrowClosed = "";
|
|
||||||
empty = "";
|
|
||||||
emptyOpen = "";
|
|
||||||
symlink = "";
|
|
||||||
symlinkOpen = "";
|
|
||||||
};
|
|
||||||
|
|
||||||
git = {
|
|
||||||
unstaged = "✗";
|
|
||||||
staged = "✓";
|
|
||||||
unmerged = "";
|
|
||||||
renamed = "➜";
|
|
||||||
untracked = "★";
|
|
||||||
deleted = "";
|
|
||||||
ignored = "◌";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
default = mkOption {
|
default = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
description = "Glyph for files. Will be overridden by `nvim-web-devicons` if available.";
|
description = "Glyph for files. Will be overridden by `nvim-web-devicons` if available.";
|
||||||
|
default = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
symlink = mkOption {
|
symlink = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
description = "Glyph for symlinks.";
|
description = "Glyph for symlinks.";
|
||||||
|
default = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
modified = mkOption {
|
modified = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
description = "Icon to display for modified files.";
|
description = "Icon to display for modified files.";
|
||||||
|
default = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
# TODO: hardcode each attribute
|
# TODO: hardcode each attribute
|
||||||
folder = mkOption {
|
folder = mkOption {
|
||||||
type = types.attrs;
|
type = types.attrs;
|
||||||
description = "Glyphs for directories. Recommended to use the defaults unless you know what you are doing.";
|
description = "Glyphs for directories. Recommended to use the defaults unless you know what you are doing.";
|
||||||
|
default = {
|
||||||
|
default = "";
|
||||||
|
open = "";
|
||||||
|
arrowOpen = "";
|
||||||
|
arrowClosed = "";
|
||||||
|
empty = "";
|
||||||
|
emptyOpen = "";
|
||||||
|
symlink = "";
|
||||||
|
symlinkOpen = "";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
git = mkOption {
|
git = mkOption {
|
||||||
type = types.attrs;
|
type = types.attrs;
|
||||||
description = "Glyphs for git status.";
|
description = "Glyphs for git status.";
|
||||||
|
default = {
|
||||||
|
unstaged = "✗";
|
||||||
|
staged = "✓";
|
||||||
|
unmerged = "";
|
||||||
|
renamed = "➜";
|
||||||
|
untracked = "★";
|
||||||
|
deleted = "";
|
||||||
|
ignored = "◌";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -788,15 +758,19 @@ with builtins; {
|
||||||
gitIgnored = mkOption {
|
gitIgnored = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
description = "Ignore files based on `.gitignore`. Requires git.enable` to be `true`";
|
description = "Ignore files based on `.gitignore`. Requires git.enable` to be `true`";
|
||||||
|
default = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
dotfiles = mkOption {
|
dotfiles = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
description = "Do not show dotfiles: files starting with a `.`";
|
description = "Do not show dotfiles: files starting with a `.`";
|
||||||
|
default = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
gitClean = mkOption {
|
gitClean = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
|
||||||
description = ''
|
description = ''
|
||||||
Do not show files with no git status. This will show ignored files when
|
Do not show files with no git status. This will show ignored files when
|
||||||
`nvim-tree.filters.git_ignored` is set, as they are effectively dirty.
|
`nvim-tree.filters.git_ignored` is set, as they are effectively dirty.
|
||||||
|
@ -805,11 +779,13 @@ with builtins; {
|
||||||
|
|
||||||
noBuffer = mkOption {
|
noBuffer = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
description = "Do not show files that have no `buflisted()` buffer.";
|
description = "Do not show files that have no `buflisted()` buffer.";
|
||||||
};
|
};
|
||||||
|
|
||||||
exclude = mkOption {
|
exclude = mkOption {
|
||||||
type = types.listOf types.str;
|
type = with types; listOf str;
|
||||||
|
default = [];
|
||||||
description = "List of directories or files to exclude from filtering: always show them.";
|
description = "List of directories or files to exclude from filtering: always show them.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -834,14 +810,7 @@ with builtins; {
|
||||||
|
|
||||||
actions = mkOption {
|
actions = mkOption {
|
||||||
description = "Configuration for various actions.";
|
description = "Configuration for various actions.";
|
||||||
default = {
|
default = {};
|
||||||
changeDir = {
|
|
||||||
enable = true;
|
|
||||||
global = false;
|
|
||||||
restrictAboveCwd = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
useSystemClipboard = mkOption {
|
useSystemClipboard = mkOption {
|
||||||
|
@ -857,15 +826,18 @@ with builtins; {
|
||||||
# change_dir actions
|
# change_dir actions
|
||||||
changeDir = mkOption {
|
changeDir = mkOption {
|
||||||
description = "vim `change-directory` behaviour";
|
description = "vim `change-directory` behaviour";
|
||||||
|
default = {};
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
description = "Change the working directory when changing directories in the tree.";
|
description = "Change the working directory when changing directories in the tree.";
|
||||||
};
|
};
|
||||||
|
|
||||||
global = mkOption {
|
global = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Use `:cd` instead of `:lcd` when changing directories.
|
Use `:cd` instead of `:lcd` when changing directories.
|
||||||
Consider that this might cause issues with the `nvim-tree.syncRootWithCwd` option.
|
Consider that this might cause issues with the `nvim-tree.syncRootWithCwd` option.
|
||||||
|
@ -874,6 +846,7 @@ with builtins; {
|
||||||
|
|
||||||
restrictAboveCwd = mkOption {
|
restrictAboveCwd = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Restrict changing to a directory above the global current working directory.
|
Restrict changing to a directory above the global current working directory.
|
||||||
'';
|
'';
|
||||||
|
@ -885,14 +858,12 @@ with builtins; {
|
||||||
# expand_all actions
|
# expand_all actions
|
||||||
expandAll = mkOption {
|
expandAll = mkOption {
|
||||||
description = "Configuration for expand_all behaviour.";
|
description = "Configuration for expand_all behaviour.";
|
||||||
default = {
|
default = {};
|
||||||
maxFolderDiscovery = 300;
|
|
||||||
exclude = [".git" "target" "build" "result"];
|
|
||||||
};
|
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
maxFolderDiscovery = mkOption {
|
maxFolderDiscovery = mkOption {
|
||||||
type = types.int;
|
type = types.int;
|
||||||
|
default = 300;
|
||||||
description = ''
|
description = ''
|
||||||
Limit the number of folders being explored when expanding every folders.
|
Limit the number of folders being explored when expanding every folders.
|
||||||
Avoids hanging neovim when running this action on very large folders.
|
Avoids hanging neovim when running this action on very large folders.
|
||||||
|
@ -901,6 +872,7 @@ with builtins; {
|
||||||
exclude = mkOption {
|
exclude = mkOption {
|
||||||
type = with types; listOf str;
|
type = with types; listOf str;
|
||||||
description = "A list of directories that should not be expanded automatically.";
|
description = "A list of directories that should not be expanded automatically.";
|
||||||
|
default = [".git" "target" "build" "result"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -909,14 +881,7 @@ with builtins; {
|
||||||
# file_popup actions
|
# file_popup actions
|
||||||
filePopup = mkOption {
|
filePopup = mkOption {
|
||||||
description = "Configuration for file_popup behaviour.";
|
description = "Configuration for file_popup behaviour.";
|
||||||
default.openWinConfig = {
|
default = {};
|
||||||
col = 1;
|
|
||||||
row = 1;
|
|
||||||
relative = "cursor";
|
|
||||||
border = "rounded";
|
|
||||||
style = "minimal";
|
|
||||||
};
|
|
||||||
|
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
openWinConfig = mkOption {
|
openWinConfig = mkOption {
|
||||||
|
@ -937,50 +902,42 @@ with builtins; {
|
||||||
# open_file actions
|
# open_file actions
|
||||||
openFile = mkOption {
|
openFile = mkOption {
|
||||||
description = "Configuration options for opening a file from nvim-tree.";
|
description = "Configuration options for opening a file from nvim-tree.";
|
||||||
|
default = {};
|
||||||
default = {
|
|
||||||
quitOnOpen = false;
|
|
||||||
eject = false;
|
|
||||||
resizeWindow = false;
|
|
||||||
windowPicker = {
|
|
||||||
enable = false;
|
|
||||||
picker = "default";
|
|
||||||
chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
|
|
||||||
exclude = {
|
|
||||||
filetype = ["notify" "packer" "qf" "diff" "fugitive" "fugitiveblame"];
|
|
||||||
buftype = ["nofile" "terminal" "help"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
quitOnOpen = mkOption {
|
quitOnOpen = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
description = "Closes the explorer when opening a file.";
|
description = "Closes the explorer when opening a file.";
|
||||||
|
default = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
eject = mkOption {
|
eject = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
description = "Prevent new opened file from opening in the same window as the tree.";
|
description = "Prevent new opened file from opening in the same window as the tree.";
|
||||||
|
default = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
resizeWindow = mkOption {
|
resizeWindow = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
|
||||||
description = "Resizes the tree when opening a file. Previously `view.auto_resize`";
|
description = "Resizes the tree when opening a file. Previously `view.auto_resize`";
|
||||||
};
|
};
|
||||||
|
|
||||||
windowPicker = mkOption {
|
windowPicker = mkOption {
|
||||||
description = "window_picker";
|
description = "window_picker";
|
||||||
|
default = {};
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
description = "Enable the window picker. If this feature is not enabled, files will open in window from which you last opened the tree.";
|
description = "Enable the window picker. If this feature is not enabled, files will open in window from which you last opened the tree.";
|
||||||
|
default = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
picker = mkOption {
|
picker = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
|
default = "default";
|
||||||
description = ''
|
description = ''
|
||||||
Change the default window picker, can be a string `"default"` or a function.
|
Change the default window picker, can be a string `"default"` or a function.
|
||||||
The function should return the window id that will open the node,
|
The function should return the window id that will open the node,
|
||||||
|
@ -998,17 +955,20 @@ with builtins; {
|
||||||
chars = mkOption {
|
chars = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
description = "A string of chars used as identifiers by the window picker.";
|
description = "A string of chars used as identifiers by the window picker.";
|
||||||
|
default = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
|
||||||
};
|
};
|
||||||
|
|
||||||
exclude = {
|
exclude = {
|
||||||
filetype = mkOption {
|
filetype = mkOption {
|
||||||
type = with types; listOf str;
|
type = with types; listOf str;
|
||||||
description = "A list of filetypes to exclude from the window picker.";
|
description = "A list of filetypes to exclude from the window picker.";
|
||||||
|
default = ["notify" "packer" "qf" "diff" "fugitive" "fugitiveblame"];
|
||||||
};
|
};
|
||||||
|
|
||||||
buftype = mkOption {
|
buftype = mkOption {
|
||||||
type = with types; listOf str;
|
type = with types; listOf str;
|
||||||
description = "A list of buftypes to exclude from the window picker.";
|
description = "A list of buftypes to exclude from the window picker.";
|
||||||
|
default = ["nofile" "terminal" "help"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1037,22 +997,19 @@ with builtins; {
|
||||||
This feature is bound to the `f` key by default.
|
This feature is bound to the `f` key by default.
|
||||||
The filter can be cleared with the `F` key by default.
|
The filter can be cleared with the `F` key by default.
|
||||||
'';
|
'';
|
||||||
|
default = {};
|
||||||
default = {
|
|
||||||
prefix = "[FILTER]: ";
|
|
||||||
alwaysShowFolders = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
prefix = mkOption {
|
prefix = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
description = "Prefix of the filter displayed in the buffer.";
|
description = "Prefix of the filter displayed in the buffer.";
|
||||||
|
default = "[FILTER]: ";
|
||||||
};
|
};
|
||||||
|
|
||||||
alwaysShowFolders = mkOption {
|
alwaysShowFolders = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
description = "Whether to filter folders or not.";
|
description = "Whether to filter folders or not.";
|
||||||
|
default = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1060,23 +1017,17 @@ with builtins; {
|
||||||
|
|
||||||
tab = mkOption {
|
tab = mkOption {
|
||||||
description = "Configuration for tab behaviour.";
|
description = "Configuration for tab behaviour.";
|
||||||
|
default = {};
|
||||||
default = {
|
|
||||||
sync = {
|
|
||||||
open = false;
|
|
||||||
close = false;
|
|
||||||
ignore = [];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
sync = mkOption {
|
sync = mkOption {
|
||||||
description = "Configuration for syncing nvim-tree across tabs.";
|
description = "Configuration for syncing nvim-tree across tabs.";
|
||||||
|
default = {};
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
open = mkOption {
|
open = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Opens the tree automatically when switching tabpage or opening a new
|
Opens the tree automatically when switching tabpage or opening a new
|
||||||
tabpage if the tree was previously open.
|
tabpage if the tree was previously open.
|
||||||
|
@ -1085,6 +1036,7 @@ with builtins; {
|
||||||
|
|
||||||
close = mkOption {
|
close = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Closes the tree across all tabpages when the tree is closed.
|
Closes the tree across all tabpages when the tree is closed.
|
||||||
'';
|
'';
|
||||||
|
@ -1092,6 +1044,7 @@ with builtins; {
|
||||||
|
|
||||||
ignore = mkOption {
|
ignore = mkOption {
|
||||||
type = with types; listOf str;
|
type = with types; listOf str;
|
||||||
|
default = [];
|
||||||
description = ''
|
description = ''
|
||||||
List of filetypes or buffer names on new tab that will prevent
|
List of filetypes or buffer names on new tab that will prevent
|
||||||
`nvim-tree.tab.sync.open` and `nvim-tree.tab.sync.close`
|
`nvim-tree.tab.sync.open` and `nvim-tree.tab.sync.close`
|
||||||
|
@ -1106,22 +1059,19 @@ with builtins; {
|
||||||
|
|
||||||
notify = mkOption {
|
notify = mkOption {
|
||||||
description = "Configuration for notifications.";
|
description = "Configuration for notifications.";
|
||||||
|
default = {};
|
||||||
default = {
|
|
||||||
threshold = "INFO";
|
|
||||||
absolutePath = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
threshold = mkOption {
|
threshold = mkOption {
|
||||||
type = types.enum ["ERROR" "WARNING" "INFO" "DEBUG"];
|
type = types.enum ["ERROR" "WARNING" "INFO" "DEBUG"];
|
||||||
default = "Specify minimum notification level, uses the values from `vim.log.levels`";
|
description = "Specify minimum notification level, uses the values from `vim.log.levels`";
|
||||||
|
default = "INFO";
|
||||||
};
|
};
|
||||||
|
|
||||||
absolutePath = mkOption {
|
absolutePath = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
description = "Whether to use absolute paths or item names in fs action notifications.";
|
description = "Whether to use absolute paths or item names in fs action notifications.";
|
||||||
|
default = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1129,25 +1079,20 @@ with builtins; {
|
||||||
|
|
||||||
ui = mkOption {
|
ui = mkOption {
|
||||||
description = "General UI configuration.";
|
description = "General UI configuration.";
|
||||||
|
default = {};
|
||||||
default = {
|
|
||||||
confirm = {
|
|
||||||
remove = true;
|
|
||||||
trash = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
confirm = {
|
confirm = {
|
||||||
remove = mkOption {
|
remove = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
description = "Prompt before removing.";
|
description = "Prompt before removing.";
|
||||||
|
default = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
trash = mkOption {
|
trash = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
description = "Prompt before trash.";
|
description = "Prompt before trash.";
|
||||||
|
default = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue