mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-26 10:48:35 +02:00
plugins/filetrees: normalize plugin defaults
This commit is contained in:
parent
b86db98f53
commit
25eed3c2f5
3 changed files with 338 additions and 294 deletions
|
@ -27,11 +27,19 @@ in
|
||||||
'';
|
'';
|
||||||
|
|
||||||
mimetypes = {
|
mimetypes = {
|
||||||
warn = mkListStr ''["audio" "font" "image" "video"]'' ''
|
warn =
|
||||||
|
mkListStr
|
||||||
|
[
|
||||||
|
"audio"
|
||||||
|
"font"
|
||||||
|
"image"
|
||||||
|
"video"
|
||||||
|
]
|
||||||
|
''
|
||||||
Show a warning before opening these datatypes.
|
Show a warning before opening these datatypes.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
allowExts = mkListStr ''[".ts"]'' ''
|
allowExts = mkListStr [ ".ts" ] ''
|
||||||
Skip warning for these extensions.
|
Skip warning for these extensions.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@ -58,16 +66,24 @@ in
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ignore = {
|
ignore = {
|
||||||
nameExact = mkListStr ''[".DS_Store" ".directory" "thumbs.db" ".git"]'' ''
|
nameExact =
|
||||||
|
mkListStr
|
||||||
|
[
|
||||||
|
".DS_Store"
|
||||||
|
".directory"
|
||||||
|
"thumbs.db"
|
||||||
|
".git"
|
||||||
|
]
|
||||||
|
''
|
||||||
Files whose name match these exactly will be ignored.
|
Files whose name match these exactly will be ignored.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nameGlob = mkListStr "[]" ''
|
nameGlob = mkListStr [ ] ''
|
||||||
Files whose name match these glob patterns will be ignored.
|
Files whose name match these glob patterns will be ignored.
|
||||||
ie. `*.py` will match all python files
|
ie. `*.py` will match all python files
|
||||||
'';
|
'';
|
||||||
|
|
||||||
pathGlob = mkListStr "[]" ''
|
pathGlob = mkListStr [ ] ''
|
||||||
Files whose full path match these glob patterns will be ignored.
|
Files whose full path match these glob patterns will be ignored.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@ -85,7 +101,14 @@ in
|
||||||
Which way does CHADTree open?
|
Which way does CHADTree open?
|
||||||
'';
|
'';
|
||||||
|
|
||||||
sortBy = mkListStr ''["is_folder" "ext" "file_name"]'' ''
|
sortBy =
|
||||||
|
mkListStr
|
||||||
|
[
|
||||||
|
"is_folder"
|
||||||
|
"ext"
|
||||||
|
"file_name"
|
||||||
|
]
|
||||||
|
''
|
||||||
CHADTree can sort by the following criterion.
|
CHADTree can sort by the following criterion.
|
||||||
Reorder them if you want a different sorting order.
|
Reorder them if you want a different sorting order.
|
||||||
legal keys: some of
|
legal keys: some of
|
||||||
|
@ -184,123 +207,141 @@ in
|
||||||
|
|
||||||
keymap = {
|
keymap = {
|
||||||
windowManagement = {
|
windowManagement = {
|
||||||
quit = mkListStr ''["q"]'' ''
|
quit = mkListStr [ "q" ] ''
|
||||||
Close CHADTree window, quit if it is the last window.
|
Close CHADTree window, quit if it is the last window.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
bigger = mkListStr ''["+" "="]'' ''
|
bigger =
|
||||||
|
mkListStr
|
||||||
|
[
|
||||||
|
"+"
|
||||||
|
"="
|
||||||
|
]
|
||||||
|
''
|
||||||
Resize CHADTree window bigger.
|
Resize CHADTree window bigger.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
smaller = mkListStr ''["-" "_"]'' ''
|
smaller =
|
||||||
|
mkListStr
|
||||||
|
[
|
||||||
|
"-"
|
||||||
|
"_"
|
||||||
|
]
|
||||||
|
''
|
||||||
Resize CHADTree window smaller.
|
Resize CHADTree window smaller.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
refresh = mkListStr ''["<c-r>"]'' ''
|
refresh = mkListStr [ "<c-r>" ] ''
|
||||||
Refresh CHADTree.
|
Refresh CHADTree.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
rerooting = {
|
rerooting = {
|
||||||
changeDir = mkListStr ''["b"]'' ''
|
changeDir = mkListStr [ "b" ] ''
|
||||||
Change vim's working directory.
|
Change vim's working directory.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
changeFocus = mkListStr ''["c"]'' ''
|
changeFocus = mkListStr [ "c" ] ''
|
||||||
Set CHADTree's root to folder at cursor. Does not change working directory.
|
Set CHADTree's root to folder at cursor. Does not change working directory.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
changeFocusUp = mkListStr ''["C"]'' ''
|
changeFocusUp = mkListStr [ "C" ] ''
|
||||||
Set CHADTree's root one level up.
|
Set CHADTree's root one level up.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
openFileFolder = {
|
openFileFolder = {
|
||||||
primary = mkListStr ''["<enter>"]'' ''
|
primary = mkListStr [ "<enter>" ] ''
|
||||||
Open file at cursor.
|
Open file at cursor.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
secondary = mkListStr ''["<tab> <2-leftmouse>"]'' ''
|
secondary = mkListStr [ "<tab> <2-leftmouse>" ] ''
|
||||||
Open file at cursor, keep cursor in CHADTree's window.
|
Open file at cursor, keep cursor in CHADTree's window.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
tertiary = mkListStr ''["<m-enter>" <middlemouse>]'' ''
|
tertiary =
|
||||||
|
mkListStr
|
||||||
|
[
|
||||||
|
"<m-enter>"
|
||||||
|
"<middlemouse>"
|
||||||
|
]
|
||||||
|
''
|
||||||
Open file at cursor in a new tab.
|
Open file at cursor in a new tab.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
vSplit = mkListStr ''["w"]'' ''
|
vSplit = mkListStr [ "w" ] ''
|
||||||
Open file at cursor in vertical split.
|
Open file at cursor in vertical split.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
hSplit = mkListStr ''["W"]'' ''
|
hSplit = mkListStr [ "W" ] ''
|
||||||
Open file at cursor in horizontal split.
|
Open file at cursor in horizontal split.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
openSys = mkListStr ''["o"]'' ''
|
openSys = mkListStr [ "o" ] ''
|
||||||
Open file with GUI tools using `open` or `xdg open`.
|
Open file with GUI tools using `open` or `xdg open`.
|
||||||
This will open third party tools such as Finder or KDE Dolphin or GNOME nautilus, etc.
|
This will open third party tools such as Finder or KDE Dolphin or GNOME nautilus, etc.
|
||||||
Depends on platform and user setup.
|
Depends on platform and user setup.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
collapse = mkListStr ''["o"]'' ''
|
collapse = mkListStr [ "o" ] ''
|
||||||
Collapse all subdirectories for directory at cursor.
|
Collapse all subdirectories for directory at cursor.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
cursor = {
|
cursor = {
|
||||||
refocus = mkListStr ''["~"]'' ''
|
refocus = mkListStr [ "~" ] ''
|
||||||
Put cursor at the root of CHADTree.
|
Put cursor at the root of CHADTree.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
jumpToCurrent = mkListStr ''["J"]'' ''
|
jumpToCurrent = mkListStr [ "J" ] ''
|
||||||
Position cursor in CHADTree at currently open buffer, if the buffer points to a location visible under CHADTree.
|
Position cursor in CHADTree at currently open buffer, if the buffer points to a location visible under CHADTree.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
stat = mkListStr ''["K"]'' ''
|
stat = mkListStr [ "K" ] ''
|
||||||
Print `ls --long` stat for file under cursor.
|
Print `ls --long` stat for file under cursor.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
copyName = mkListStr ''["y"]'' ''
|
copyName = mkListStr [ "y" ] ''
|
||||||
Copy paths of files under cursor or visual block.
|
Copy paths of files under cursor or visual block.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
copyBasename = mkListStr ''["Y"]'' ''
|
copyBasename = mkListStr [ "Y" ] ''
|
||||||
Copy names of files under cursor or visual block.
|
Copy names of files under cursor or visual block.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
copyRelname = mkListStr ''["<c-y>"]'' ''
|
copyRelname = mkListStr [ "<c-y>" ] ''
|
||||||
Copy relative paths of files under cursor or visual block.
|
Copy relative paths of files under cursor or visual block.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
filtering = {
|
filtering = {
|
||||||
filter = mkListStr ''["f"]'' ''
|
filter = mkListStr [ "f" ] ''
|
||||||
Set a glob pattern to narrow down visible files.
|
Set a glob pattern to narrow down visible files.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
clearFilter = mkListStr ''["F"]'' ''
|
clearFilter = mkListStr [ "F" ] ''
|
||||||
Clear filter.
|
Clear filter.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
bookmarks = {
|
bookmarks = {
|
||||||
bookmarkGoto = mkListStr ''["m"]'' ''
|
bookmarkGoto = mkListStr [ "m" ] ''
|
||||||
Goto bookmark `A-Z`.
|
Goto bookmark `A-Z`.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
selecting = {
|
selecting = {
|
||||||
select = mkListStr ''["s"]'' ''
|
select = mkListStr [ "s" ] ''
|
||||||
Select files under cursor or visual block.
|
Select files under cursor or visual block.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
clearSelection = mkListStr ''["S"]'' ''
|
clearSelection = mkListStr [ "S" ] ''
|
||||||
Clear selection.
|
Clear selection.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
fileOperations = {
|
fileOperations = {
|
||||||
new = mkListStr ''["a"]'' ''
|
new = mkListStr [ "a" ] ''
|
||||||
Create new file at location under cursor. Files ending with platform specific path separator will be folders.
|
Create new file at location under cursor. Files ending with platform specific path separator will be folders.
|
||||||
|
|
||||||
Intermediary folders are created automatically.
|
Intermediary folders are created automatically.
|
||||||
|
@ -308,7 +349,7 @@ in
|
||||||
ie. `uwu/owo/` under unix will create `uwu/` then `owo/` under it. Both are folders.
|
ie. `uwu/owo/` under unix will create `uwu/` then `owo/` under it. Both are folders.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
link = mkListStr ''["A"]'' ''
|
link = mkListStr [ "A" ] ''
|
||||||
Create links at location under cursor from selection.
|
Create links at location under cursor from selection.
|
||||||
|
|
||||||
Links are always relative.
|
Links are always relative.
|
||||||
|
@ -316,44 +357,44 @@ in
|
||||||
Intermediary folders are created automatically.
|
Intermediary folders are created automatically.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
rename = mkListStr ''["r"]'' ''
|
rename = mkListStr [ "r" ] ''
|
||||||
Rename file under cursor.
|
Rename file under cursor.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
toggleExec = mkListStr ''["X"]'' ''
|
toggleExec = mkListStr [ "X" ] ''
|
||||||
Toggle all the `+x` bits of the selected / highlighted files.
|
Toggle all the `+x` bits of the selected / highlighted files.
|
||||||
|
|
||||||
Except for directories, where `-x` will prevent reading.
|
Except for directories, where `-x` will prevent reading.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
copy = mkListStr ''["p"]'' ''
|
copy = mkListStr [ "p" ] ''
|
||||||
Copy the selected files to location under cursor.
|
Copy the selected files to location under cursor.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
cut = mkListStr ''["x"]'' ''
|
cut = mkListStr [ "x" ] ''
|
||||||
Move the selected files to location under cursor.
|
Move the selected files to location under cursor.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
delete = mkListStr ''["d"]'' ''
|
delete = mkListStr [ "d" ] ''
|
||||||
Delete the selected files. Items deleted cannot be recovered.
|
Delete the selected files. Items deleted cannot be recovered.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
trash = mkListStr ''[t]'' ''
|
trash = mkListStr [ "t" ] ''
|
||||||
Trash the selected files using platform specific `trash` command, if they are available.
|
Trash the selected files using platform specific `trash` command, if they are available.
|
||||||
Items trashed may be recovered.
|
Items trashed may be recovered.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
toggles = {
|
toggles = {
|
||||||
toggleHidden = mkListStr ''["."]'' ''
|
toggleHidden = mkListStr [ "." ] ''
|
||||||
Toggle show_hidden on and off. See `chadtree.showHidden` for details.
|
Toggle show_hidden on and off. See `chadtree.showHidden` for details.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
toggleFollow = mkListStr ''["u"]'' ''
|
toggleFollow = mkListStr [ "u" ] ''
|
||||||
Toggle `follow` on and off. See `chadtree.follow` for details.
|
Toggle `follow` on and off. See `chadtree.follow` for details.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
toggleVersionControl = mkListStr ''["i"]'' ''
|
toggleVersionControl = mkListStr [ "i" ] ''
|
||||||
Toggle version control integration on and off.
|
Toggle version control integration on and off.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
@ -58,8 +58,12 @@ in
|
||||||
package = helpers.mkPluginPackageOption "neo-tree" pkgs.vimPlugins.neo-tree-nvim;
|
package = helpers.mkPluginPackageOption "neo-tree" pkgs.vimPlugins.neo-tree-nvim;
|
||||||
|
|
||||||
sources =
|
sources =
|
||||||
helpers.defaultNullOpts.mkNullable (types.listOf types.str)
|
helpers.defaultNullOpts.mkListOf types.str
|
||||||
''["filesystem" "buffers" "git_status"]''
|
[
|
||||||
|
"filesystem"
|
||||||
|
"buffers"
|
||||||
|
"git_status"
|
||||||
|
]
|
||||||
''
|
''
|
||||||
If a user has a sources list it will replace this one.
|
If a user has a sources list it will replace this one.
|
||||||
Only sources listed here will be loaded.
|
Only sources listed here will be loaded.
|
||||||
|
@ -122,12 +126,12 @@ in
|
||||||
] "info" "";
|
] "info" "";
|
||||||
|
|
||||||
logToFile =
|
logToFile =
|
||||||
helpers.defaultNullOpts.mkNullable (types.either types.bool types.str) "false"
|
helpers.defaultNullOpts.mkNullable (types.either types.bool types.str) false
|
||||||
"use :NeoTreeLogs to show the file";
|
"use :NeoTreeLogs to show the file";
|
||||||
|
|
||||||
openFilesInLastWindow = helpers.defaultNullOpts.mkBool true "If `false`, open files in top left window";
|
openFilesInLastWindow = helpers.defaultNullOpts.mkBool true "If `false`, open files in top left window";
|
||||||
|
|
||||||
popupBorderStyle = helpers.defaultNullOpts.mkEnum [
|
popupBorderStyle = helpers.defaultNullOpts.mkEnumFirstDefault [
|
||||||
"NC"
|
"NC"
|
||||||
"double"
|
"double"
|
||||||
"none"
|
"none"
|
||||||
|
@ -135,7 +139,7 @@ in
|
||||||
"shadow"
|
"shadow"
|
||||||
"single"
|
"single"
|
||||||
"solid"
|
"solid"
|
||||||
] "NC" "";
|
] "";
|
||||||
|
|
||||||
resizeTimerInterval = helpers.defaultNullOpts.mkInt 500 ''
|
resizeTimerInterval = helpers.defaultNullOpts.mkInt 500 ''
|
||||||
In ms, needed for containers to redraw right aligned and faded content.
|
In ms, needed for containers to redraw right aligned and faded content.
|
||||||
|
@ -228,7 +232,7 @@ in
|
||||||
helpers.defaultNullOpts.mkNullable types.int null
|
helpers.defaultNullOpts.mkNullable types.int null
|
||||||
"This will truncate text even if `textTruncToFit = false`";
|
"This will truncate text even if `textTruncToFit = false`";
|
||||||
|
|
||||||
padding = helpers.defaultNullOpts.mkNullable (with types; either int (attrsOf int)) "0" ''
|
padding = helpers.defaultNullOpts.mkNullable (with types; either int (attrsOf int)) 0 ''
|
||||||
Defines the global padding of the source selector.
|
Defines the global padding of the source selector.
|
||||||
It can be an integer or an attrs with keys `left` and `right`.
|
It can be an integer or an attrs with keys `left` and `right`.
|
||||||
Setting `padding = 2` is exactly the same as `{ left = 2; right = 2; }`.
|
Setting `padding = 2` is exactly the same as `{ left = 2; right = 2; }`.
|
||||||
|
@ -236,7 +240,9 @@ in
|
||||||
Example: `{ left = 2; right = 0; }`
|
Example: `{ left = 2; right = 0; }`
|
||||||
'';
|
'';
|
||||||
|
|
||||||
separator = helpers.defaultNullOpts.mkNullable (
|
separator =
|
||||||
|
helpers.defaultNullOpts.mkNullable
|
||||||
|
(
|
||||||
with types;
|
with types;
|
||||||
either str (submodule {
|
either str (submodule {
|
||||||
options = {
|
options = {
|
||||||
|
@ -245,7 +251,12 @@ in
|
||||||
override = helpers.defaultNullOpts.mkStr null "";
|
override = helpers.defaultNullOpts.mkStr null "";
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
) "Can be a string or a table" ''{ left = "▏"; right= "▕"; }'';
|
)
|
||||||
|
{
|
||||||
|
left = "▏";
|
||||||
|
right = "▕";
|
||||||
|
}
|
||||||
|
"Can be a string or a table";
|
||||||
|
|
||||||
separatorActive =
|
separatorActive =
|
||||||
helpers.defaultNullOpts.mkNullable
|
helpers.defaultNullOpts.mkNullable
|
||||||
|
@ -416,8 +427,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
renderers = {
|
renderers = {
|
||||||
directory = mkRendererComponentListOption ''
|
directory = mkRendererComponentListOption [
|
||||||
[
|
|
||||||
"indent"
|
"indent"
|
||||||
"icon"
|
"icon"
|
||||||
"current_filter"
|
"current_filter"
|
||||||
|
@ -447,11 +457,9 @@ in
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
]
|
] "directory renderers";
|
||||||
'' "directory renderers";
|
|
||||||
|
|
||||||
file = mkRendererComponentListOption ''
|
file = mkRendererComponentListOption [
|
||||||
[
|
|
||||||
"indent"
|
"indent"
|
||||||
"icon"
|
"icon"
|
||||||
{
|
{
|
||||||
|
@ -486,11 +494,9 @@ in
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
]
|
] "file renderers";
|
||||||
'' "file renderers";
|
|
||||||
|
|
||||||
message = mkRendererComponentListOption ''
|
message = mkRendererComponentListOption [
|
||||||
[
|
|
||||||
{
|
{
|
||||||
name = "indent";
|
name = "indent";
|
||||||
with_markers = false;
|
with_markers = false;
|
||||||
|
@ -499,30 +505,27 @@ in
|
||||||
name = "name";
|
name = "name";
|
||||||
highlight = "NeoTreeMessage";
|
highlight = "NeoTreeMessage";
|
||||||
}
|
}
|
||||||
]
|
] "message renderers";
|
||||||
'' "message renderers";
|
|
||||||
|
|
||||||
terminal = mkRendererComponentListOption ''
|
terminal = mkRendererComponentListOption [
|
||||||
[
|
|
||||||
"indent"
|
"indent"
|
||||||
"icon"
|
"icon"
|
||||||
"name"
|
"name"
|
||||||
"bufnr"
|
"bufnr"
|
||||||
]
|
] "message renderers";
|
||||||
'' "message renderers";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nestingRules = helpers.defaultNullOpts.mkNullable (types.attrsOf types.str) "{}" "nesting rules";
|
nestingRules = helpers.defaultNullOpts.mkAttrsOf types.str { } "nesting rules";
|
||||||
|
|
||||||
window = {
|
window = {
|
||||||
position = helpers.defaultNullOpts.mkEnum [
|
position = helpers.defaultNullOpts.mkEnumFirstDefault [
|
||||||
"left"
|
"left"
|
||||||
"right"
|
"right"
|
||||||
"top"
|
"top"
|
||||||
"bottom"
|
"bottom"
|
||||||
"float"
|
"float"
|
||||||
"current"
|
"current"
|
||||||
] "left" "position";
|
] "position";
|
||||||
|
|
||||||
width = helpers.defaultNullOpts.mkInt 40 "Applies to left and right positions";
|
width = helpers.defaultNullOpts.mkInt 40 "Applies to left and right positions";
|
||||||
|
|
||||||
|
@ -572,7 +575,7 @@ in
|
||||||
nowait = helpers.defaultNullOpts.mkBool true "nowait";
|
nowait = helpers.defaultNullOpts.mkBool true "nowait";
|
||||||
};
|
};
|
||||||
|
|
||||||
mappings = mkMappingsOption ''
|
mappings = mkMappingsOption (literalMD ''
|
||||||
```nix
|
```nix
|
||||||
{
|
{
|
||||||
"<space>" = {
|
"<space>" = {
|
||||||
|
@ -622,10 +625,10 @@ in
|
||||||
">" = "next_source";
|
">" = "next_source";
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
'';
|
'');
|
||||||
};
|
};
|
||||||
filesystem = {
|
filesystem = {
|
||||||
window = mkWindowMappingsOption ''
|
window = mkWindowMappingsOption (literalMD ''
|
||||||
```nix
|
```nix
|
||||||
{
|
{
|
||||||
H = "toggle_hidden";
|
H = "toggle_hidden";
|
||||||
|
@ -642,7 +645,7 @@ in
|
||||||
"]g" = "next_git_modified";
|
"]g" = "next_git_modified";
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
'';
|
'');
|
||||||
asyncDirectoryScan =
|
asyncDirectoryScan =
|
||||||
helpers.defaultNullOpts.mkEnumFirstDefault
|
helpers.defaultNullOpts.mkEnumFirstDefault
|
||||||
[
|
[
|
||||||
|
@ -688,39 +691,44 @@ in
|
||||||
|
|
||||||
hideHidden = helpers.defaultNullOpts.mkBool true "only works on Windows for hidden files/directories";
|
hideHidden = helpers.defaultNullOpts.mkBool true "only works on Windows for hidden files/directories";
|
||||||
|
|
||||||
hideByName =
|
hideByName = helpers.defaultNullOpts.mkListOf types.str [
|
||||||
helpers.defaultNullOpts.mkNullable (types.listOf types.str) ''[".DS_Store" "thumbs.db"]''
|
".DS_Store"
|
||||||
"hide by name";
|
"thumbs.db"
|
||||||
|
] "hide by name";
|
||||||
|
|
||||||
hideByPattern = helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]" ''
|
hideByPattern = helpers.defaultNullOpts.mkListOf' {
|
||||||
Hide by pattern.
|
type = types.str;
|
||||||
|
pluginDefault = [ ];
|
||||||
Example:
|
description = "Hide by pattern.";
|
||||||
```nix
|
example = [
|
||||||
[
|
|
||||||
"*.meta"
|
"*.meta"
|
||||||
"*/src/*/tsconfig.json"
|
"*/src/*/tsconfig.json"
|
||||||
]
|
];
|
||||||
```
|
};
|
||||||
'';
|
|
||||||
|
|
||||||
alwaysShow = helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]" ''
|
alwaysShow = helpers.defaultNullOpts.mkListOf' {
|
||||||
Files/folders to always show.
|
type = types.str;
|
||||||
|
pluginDefault = [ ];
|
||||||
|
description = "Files/folders to always show.";
|
||||||
|
example = [ ".gitignore" ];
|
||||||
|
};
|
||||||
|
|
||||||
Example: `[".gitignore"]`
|
neverShow = helpers.defaultNullOpts.mkListOf' {
|
||||||
'';
|
type = types.str;
|
||||||
|
pluginDefault = [ ];
|
||||||
|
description = "Files/folders to never show.";
|
||||||
|
example = [
|
||||||
|
".DS_Store"
|
||||||
|
"thumbs.db"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
neverShow = helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]" ''
|
neverShowByPattern = helpers.defaultNullOpts.mkListOf' {
|
||||||
Files/folders to never show.
|
type = types.str;
|
||||||
|
pluginDefault = [ ];
|
||||||
Example: `[".DS_Store" "thumbs.db"]`
|
description = "Files/folders to never show (by pattern).";
|
||||||
'';
|
example = [ ".null-ls_*" ];
|
||||||
|
};
|
||||||
neverShowByPattern = helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]" ''
|
|
||||||
Files/folders to never show (by pattern).
|
|
||||||
|
|
||||||
Example: `[".null-ls_*"]`
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
findByFullPathWords = helpers.defaultNullOpts.mkBool false ''
|
findByFullPathWords = helpers.defaultNullOpts.mkBool false ''
|
||||||
|
@ -737,14 +745,12 @@ in
|
||||||
helpers.mkNullOrStrLuaFnOr
|
helpers.mkNullOrStrLuaFnOr
|
||||||
(types.submodule {
|
(types.submodule {
|
||||||
options = {
|
options = {
|
||||||
fd = helpers.defaultNullOpts.mkNullable (types.listOf types.str) ''
|
fd = helpers.defaultNullOpts.mkListOf types.str [
|
||||||
[
|
|
||||||
"--exclude"
|
"--exclude"
|
||||||
".git"
|
".git"
|
||||||
"--exclude"
|
"--exclude"
|
||||||
"node_modules"
|
"node_modules"
|
||||||
]
|
] "You can specify extra args to pass to the find command.";
|
||||||
'' "You can specify extra args to pass to the find command.";
|
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
''
|
''
|
||||||
|
@ -824,18 +830,15 @@ in
|
||||||
|
|
||||||
groupEmptyDirs = helpers.defaultNullOpts.mkBool true "When true, empty directories will be grouped together.";
|
groupEmptyDirs = helpers.defaultNullOpts.mkBool true "When true, empty directories will be grouped together.";
|
||||||
|
|
||||||
window = mkWindowMappingsOption ''
|
window = mkWindowMappingsOption {
|
||||||
{
|
|
||||||
"<bs>" = "navigate_up";
|
"<bs>" = "navigate_up";
|
||||||
"." = "set_root";
|
"." = "set_root";
|
||||||
bd = "buffer_delete";
|
bd = "buffer_delete";
|
||||||
}
|
};
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
gitStatus = {
|
gitStatus = {
|
||||||
window = mkWindowMappingsOption ''
|
window = mkWindowMappingsOption {
|
||||||
{
|
|
||||||
A = "git_add_all";
|
A = "git_add_all";
|
||||||
gu = "git_unstage_file";
|
gu = "git_unstage_file";
|
||||||
ga = "git_add_file";
|
ga = "git_add_file";
|
||||||
|
@ -843,14 +846,12 @@ in
|
||||||
gc = "git_commit";
|
gc = "git_commit";
|
||||||
gp = "git_push";
|
gp = "git_push";
|
||||||
gg = "git_commit_and_push";
|
gg = "git_commit_and_push";
|
||||||
}
|
};
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
example = {
|
example = {
|
||||||
renderers = {
|
renderers = {
|
||||||
custom = mkRendererComponentListOption ''
|
custom = mkRendererComponentListOption [
|
||||||
[
|
|
||||||
"indent"
|
"indent"
|
||||||
{
|
{
|
||||||
name = "icon";
|
name = "icon";
|
||||||
|
@ -858,17 +859,14 @@ in
|
||||||
}
|
}
|
||||||
"custom"
|
"custom"
|
||||||
"name"
|
"name"
|
||||||
]
|
] "custom renderers";
|
||||||
'' "custom renderers";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
window = mkWindowMappingsOption ''
|
window = mkWindowMappingsOption {
|
||||||
{
|
|
||||||
"<cr>" = "toggle_node";
|
"<cr>" = "toggle_node";
|
||||||
"<C-e>" = "example_command";
|
"<C-e>" = "example_command";
|
||||||
d = "show_debug_info";
|
d = "show_debug_info";
|
||||||
}
|
};
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
documentSymbols = {
|
documentSymbols = {
|
||||||
|
@ -913,7 +911,7 @@ in
|
||||||
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_documentSymbol
|
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_documentSymbol
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
window = mkWindowMappingsOption "{}";
|
window = mkWindowMappingsOption { };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -11,11 +11,8 @@ let
|
||||||
inherit (helpers) ifNonNull';
|
inherit (helpers) ifNonNull';
|
||||||
|
|
||||||
openWinConfigOption =
|
openWinConfigOption =
|
||||||
helpers.defaultNullOpts.mkNullable
|
helpers.defaultNullOpts.mkAttributeSet
|
||||||
# Type
|
|
||||||
types.attrs
|
|
||||||
# Default
|
# Default
|
||||||
''
|
|
||||||
{
|
{
|
||||||
col = 1;
|
col = 1;
|
||||||
row = 1;
|
row = 1;
|
||||||
|
@ -23,7 +20,6 @@ let
|
||||||
border = "shadow";
|
border = "shadow";
|
||||||
style = "minimal";
|
style = "minimal";
|
||||||
}
|
}
|
||||||
''
|
|
||||||
# Description
|
# Description
|
||||||
''
|
''
|
||||||
Floating window config for file_popup. See |nvim_open_win| for more details.
|
Floating window config for file_popup. See |nvim_open_win| for more details.
|
||||||
|
@ -97,14 +93,13 @@ in
|
||||||
'';
|
'';
|
||||||
|
|
||||||
sortBy =
|
sortBy =
|
||||||
helpers.defaultNullOpts.mkNullable
|
helpers.defaultNullOpts.mkEnumFirstDefault
|
||||||
(types.either (types.enum [
|
[
|
||||||
"name"
|
"name"
|
||||||
"case_sensitive"
|
"case_sensitive"
|
||||||
"modification_time"
|
"modification_time"
|
||||||
"extension"
|
"extension"
|
||||||
]) helpers.nixvimTypes.rawLua)
|
]
|
||||||
"name"
|
|
||||||
''
|
''
|
||||||
Changes how files within the same directory are sorted.
|
Changes how files within the same directory are sorted.
|
||||||
Can be one of `name`, `case_sensitive`, `modification_time`, `extension` or a
|
Can be one of `name`, `case_sensitive`, `modification_time`, `extension` or a
|
||||||
|
@ -139,7 +134,7 @@ in
|
||||||
Keeps the cursor on the first letter of the filename when moving in the tree.
|
Keeps the cursor on the first letter of the filename when moving in the tree.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
rootDirs = helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]" ''
|
rootDirs = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Preferred root directories.
|
Preferred root directories.
|
||||||
Only relevant when `updateFocusedFile.updateRoot` is `true`.
|
Only relevant when `updateFocusedFile.updateRoot` is `true`.
|
||||||
'';
|
'';
|
||||||
|
@ -187,7 +182,7 @@ in
|
||||||
Only relevant when `updateFocusedFile.enable` is `true`
|
Only relevant when `updateFocusedFile.enable` is `true`
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ignoreList = helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]" ''
|
ignoreList = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
List of buffer names and filetypes that will not update the root dir of the tree if the
|
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.
|
file isn't found under the current root directory.
|
||||||
Only relevant when `updateFocusedFile.updateRoot` and `updateFocusedFile.enable` are
|
Only relevant when `updateFocusedFile.updateRoot` and `updateFocusedFile.enable` are
|
||||||
|
@ -205,7 +200,7 @@ in
|
||||||
Windows: "`cmd"`
|
Windows: "`cmd"`
|
||||||
'';
|
'';
|
||||||
|
|
||||||
args = helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]" ''
|
args = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Optional argument list.
|
Optional argument list.
|
||||||
|
|
||||||
Leave empty for OS specific default:
|
Leave empty for OS specific default:
|
||||||
|
@ -310,7 +305,7 @@ in
|
||||||
Idle milliseconds between filesystem change and action.
|
Idle milliseconds between filesystem change and action.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ignoreDirs = helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]" ''
|
ignoreDirs = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
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$"`.
|
||||||
See |string-match|.
|
See |string-match|.
|
||||||
|
@ -389,7 +384,7 @@ in
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
"30"
|
30
|
||||||
''
|
''
|
||||||
Width of the window: can be a `%` string, a number representing columns or a table.
|
Width of the window: can be a `%` string, a number representing columns or a table.
|
||||||
A table indicates that the view should be dynamically sized based on the longest line.
|
A table indicates that the view should be dynamically sized based on the longest line.
|
||||||
|
@ -421,13 +416,12 @@ in
|
||||||
'';
|
'';
|
||||||
|
|
||||||
signcolumn =
|
signcolumn =
|
||||||
helpers.defaultNullOpts.mkEnum
|
helpers.defaultNullOpts.mkEnumFirstDefault
|
||||||
[
|
[
|
||||||
"yes"
|
"yes"
|
||||||
"auto"
|
"auto"
|
||||||
"no"
|
"no"
|
||||||
]
|
]
|
||||||
"yes"
|
|
||||||
''
|
''
|
||||||
Show diagnostic sign column. Value can be `"yes"`, `"auto"`, `"no"`.
|
Show diagnostic sign column. Value can be `"yes"`, `"auto"`, `"no"`.
|
||||||
'';
|
'';
|
||||||
|
@ -570,13 +564,12 @@ in
|
||||||
'';
|
'';
|
||||||
|
|
||||||
modifiedPlacement =
|
modifiedPlacement =
|
||||||
helpers.defaultNullOpts.mkEnum
|
helpers.defaultNullOpts.mkEnumFirstDefault
|
||||||
[
|
[
|
||||||
"after"
|
"after"
|
||||||
"before"
|
"before"
|
||||||
"signcolumn"
|
"signcolumn"
|
||||||
]
|
]
|
||||||
"after"
|
|
||||||
''
|
''
|
||||||
Place where the modified icon will be rendered.
|
Place where the modified icon will be rendered.
|
||||||
Can be `"after"` or `"before"` filename (after the file/folders icons) or `"signcolumn"`
|
Can be `"after"` or `"before"` filename (after the file/folders icons) or `"signcolumn"`
|
||||||
|
@ -682,10 +675,12 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
specialFiles =
|
specialFiles = helpers.defaultNullOpts.mkListOf types.str [
|
||||||
helpers.defaultNullOpts.mkNullable (types.listOf types.str)
|
"Cargo.toml"
|
||||||
"[ \"Cargo.toml\" \"Makefile\" \"README.md\" \"readme.md\" ]"
|
"Makefile"
|
||||||
"A list of filenames that gets highlighted with `NvimTreeSpecialFile`.";
|
"README.md"
|
||||||
|
"readme.md"
|
||||||
|
] "A list of filenames that gets highlighted with `NvimTreeSpecialFile`.";
|
||||||
|
|
||||||
symlinkDestination = helpers.defaultNullOpts.mkBool true ''
|
symlinkDestination = helpers.defaultNullOpts.mkBool true ''
|
||||||
Whether to show the destination of the symlink.
|
Whether to show the destination of the symlink.
|
||||||
|
@ -711,13 +706,13 @@ in
|
||||||
A reload or filesystem event will result in an update.
|
A reload or filesystem event will result in an update.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
custom = helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]" ''
|
custom = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Custom list of vim regex for file/directory names that will not be shown.
|
Custom list of vim regex for file/directory names that will not be shown.
|
||||||
Backslashes must be escaped e.g. "^\\.git". See |string-match|.
|
Backslashes must be escaped e.g. "^\\.git". See |string-match|.
|
||||||
Toggle via the `toggle_custom` action, default mapping `U`.
|
Toggle via the `toggle_custom` action, default mapping `U`.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
exclude = helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]" ''
|
exclude = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
List of directories or files to exclude from filtering: always show them.
|
List of directories or files to exclude from filtering: always show them.
|
||||||
Overrides `git.ignore`, `filters.dotfiles` and `filters.custom`.
|
Overrides `git.ignore`, `filters.dotfiles` and `filters.custom`.
|
||||||
'';
|
'';
|
||||||
|
@ -753,7 +748,7 @@ in
|
||||||
Avoids hanging neovim when running this action on very large folders.
|
Avoids hanging neovim when running this action on very large folders.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
exclude = helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]" ''
|
exclude = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
A list of directories that should not be expanded automatically.
|
A list of directories that should not be expanded automatically.
|
||||||
E.g `[ ".git" "target" "build" ]` etc.
|
E.g `[ ".git" "target" "build" ]` etc.
|
||||||
'';
|
'';
|
||||||
|
@ -781,29 +776,39 @@ in
|
||||||
tree.
|
tree.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
picker =
|
picker = helpers.defaultNullOpts.mkStr' {
|
||||||
helpers.defaultNullOpts.mkNullable (types.either types.str helpers.nixvimTypes.rawLua) "default"
|
pluginDefault = "default";
|
||||||
''
|
description = ''
|
||||||
Change the default window picker, can be a string `"default"` or a function.
|
Change the default window picker. This can either be a string or a function (see example).
|
||||||
|
|
||||||
The function should return the window id that will open the node, or `nil` if an
|
The function should return the window id that will open the node, or `nil` if an
|
||||||
invalid window is picked or user cancelled the action.
|
invalid window is picked or user cancelled the action.
|
||||||
|
|
||||||
This can be both a string or a function (see example below).
|
|
||||||
picker = { __raw = "require('window-picker').pick_window"; };
|
|
||||||
'';
|
'';
|
||||||
|
example.__raw = "require('window-picker').pick_window";
|
||||||
|
};
|
||||||
|
|
||||||
chars = helpers.defaultNullOpts.mkStr "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890" ''
|
chars = helpers.defaultNullOpts.mkStr "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890" ''
|
||||||
A string of chars used as identifiers by the window picker.
|
A string of chars used as identifiers by the window picker.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
exclude =
|
exclude =
|
||||||
helpers.defaultNullOpts.mkNullable (with types; attrsOf (listOf str))
|
helpers.defaultNullOpts.mkAttrsOf (with types; listOf str)
|
||||||
''
|
|
||||||
{
|
{
|
||||||
filetype = [ "notify" "lazy" "packer" "qf" "diff" "fugitive" "fugitiveblame" ];
|
filetype = [
|
||||||
buftype = [ "nofile" "terminal" "help" ];
|
"notify"
|
||||||
};
|
"lazy"
|
||||||
''
|
"packer"
|
||||||
|
"qf"
|
||||||
|
"diff"
|
||||||
|
"fugitive"
|
||||||
|
"fugitiveblame"
|
||||||
|
];
|
||||||
|
buftype = [
|
||||||
|
"nofile"
|
||||||
|
"terminal"
|
||||||
|
"help"
|
||||||
|
];
|
||||||
|
}
|
||||||
''
|
''
|
||||||
Table of buffer option names mapped to a list of option values that indicates to
|
Table of buffer option names mapped to a list of option values that indicates to
|
||||||
the picker that the buffer's window should not be selectable.
|
the picker that the buffer's window should not be selectable.
|
||||||
|
@ -845,7 +850,7 @@ in
|
||||||
Closes the tree across all tabpages when the tree is closed.
|
Closes the tree across all tabpages when the tree is closed.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ignore = helpers.defaultNullOpts.mkNullable (with types; listOf str) "[]" ''
|
ignore = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
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|
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue