misc: fix documentation generation

This commit is contained in:
Gaetan Lepage 2023-06-26 08:51:36 +02:00 committed by Gaétan Lepage
parent 794356625c
commit be6a29c800
2 changed files with 98 additions and 101 deletions

View file

@ -609,73 +609,79 @@ in {
nowait = helpers.defaultNullOpts.mkBool true "nowait";
};
mappings = mkMappingsOption ''
{
"<space>" = {
command = "toggle_node";
# disable `nowait` if you have existing combos starting with this char that you want to use
nowait = false;
};
"<2-LeftMouse>" = "open";
"<cr>" = "open";
"<esc>" = "revert_preview";
P = {
command = "toggle_preview";
config = { use_float = true; };
};
l = "focus_preview";
S = "open_split";
# S = "split_with_window_picker";
s = "open_vsplit";
# s = "vsplit_with_window_picker";
t = "open_tabnew";
# "<cr>" = "open_drop";
# t = "open_tab_drop";
w = "open_with_window_picker";
C = "close_node";
z = "close_all_nodes";
# Z = "expand_all_nodes";
R = "refresh";
a = {
command = "add";
# some commands may take optional config options, see `:h neo-tree-mappings` for details
config = {
show_path = "none"; # "none", "relative", "absolute"
};
};
A = "add_directory"; # also accepts the config.show_path and config.insert_as options.
d = "delete";
r = "rename";
y = "copy_to_clipboard";
x = "cut_to_clipboard";
p = "paste_from_clipboard";
c = "copy"; # takes text input for destination, also accepts the config.show_path and config.insert_as options
m = "move"; # takes text input for destination, also accepts the config.show_path and config.insert_as options
e = "toggle_auto_expand_width";
q = "close_window";
"?" = "show_help";
"<" = "prev_source";
">" = "next_source";
}
'';
mappings =
mkMappingsOption
''
```
{
"<space>" = {
command = "toggle_node";
# disable `nowait` if you have existing combos starting with this char that you want to use
nowait = false;
};
"<2-LeftMouse>" = "open";
"<cr>" = "open";
"<esc>" = "revert_preview";
P = {
command = "toggle_preview";
config = { use_float = true; };
};
l = "focus_preview";
S = "open_split";
# S = "split_with_window_picker";
s = "open_vsplit";
# s = "vsplit_with_window_picker";
t = "open_tabnew";
# "<cr>" = "open_drop";
# t = "open_tab_drop";
w = "open_with_window_picker";
C = "close_node";
z = "close_all_nodes";
# Z = "expand_all_nodes";
R = "refresh";
a = {
command = "add";
# some commands may take optional config options, see `:h neo-tree-mappings` for details
config = {
show_path = "none"; # "none", "relative", "absolute"
};
};
A = "add_directory"; # also accepts the config.show_path and config.insert_as options.
d = "delete";
r = "rename";
y = "copy_to_clipboard";
x = "cut_to_clipboard";
p = "paste_from_clipboard";
c = "copy"; # takes text input for destination, also accepts the config.show_path and config.insert_as options
m = "move"; # takes text input for destination, also accepts the config.show_path and config.insert_as options
e = "toggle_auto_expand_width";
q = "close_window";
"?" = "show_help";
"<" = "prev_source";
">" = "next_source";
}
```
'';
};
filesystem = helpers.mkCompositeOption "Filesystem options" {
window = mkWindowMappingsOption ''
{
H = "toggle_hidden";
"/" = "fuzzy_finder";
D = "fuzzy_finder_directory";
# "/" = "filter_as_you_type"; # this was the default until v1.28
"#" = "fuzzy_sorter"; # fuzzy sorting using the fzy algorithm
# D = "fuzzy_sorter_directory";
f = "filter_on_submit";
"<C-x>" = "clear_filter";
"<bs>" = "navigate_up";
"." = "set_root";
"[g" = "prev_git_modified";
"]g" = "next_git_modified";
}
'';
window = mkWindowMappingsOption (lib.mdDoc ''
```
{
H = "toggle_hidden";
"/" = "fuzzy_finder";
D = "fuzzy_finder_directory";
# "/" = "filter_as_you_type"; # this was the default until v1.28
"#" = "fuzzy_sorter"; # fuzzy sorting using the fzy algorithm
# D = "fuzzy_sorter_directory";
f = "filter_on_submit";
"<C-x>" = "clear_filter";
"<bs>" = "navigate_up";
"." = "set_root";
"[g" = "prev_git_modified";
"]g" = "next_git_modified";
}
```
'');
asyncDirectoryScan = helpers.defaultNullOpts.mkEnumFirstDefault ["auto" "always" "never"] ''
- "auto" means refreshes are async, but it's synchronous when called from the Neotree
commands.
@ -719,48 +725,39 @@ in {
"only works on Windows for hidden files/directories";
hideByName =
helpers.defaultNullOpts.mkNullable (types.listOf types.str) ''
[
".DS_Store"
"thumbs.db"
# "node_modules"
]
''
helpers.defaultNullOpts.mkNullable (types.listOf types.str)
''[".DS_Store" "thumbs.db"]''
"hide by name";
hideByPattern =
helpers.defaultNullOpts.mkNullable (types.listOf types.str) ''
[
# "*.meta"
# "*/src/*/tsconfig.json"
]
''
"hide by pattern";
hideByPattern = helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]" ''
Hide by pattern.
alwaysShow =
helpers.defaultNullOpts.mkNullable (types.listOf types.str) ''
Example:
```
[
# ".gitignored"
"*.meta"
"*/src/*/tsconfig.json"
]
''
"files/folders to always show";
```
'';
neverShow =
helpers.defaultNullOpts.mkNullable (types.listOf types.str) ''
[
# ".DS_Store"
# "thumbs.db"
]
''
"files/folders to never show";
alwaysShow = helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]" ''
Files/folders to always show.
neverShowByPattern =
helpers.defaultNullOpts.mkNullable (types.listOf types.str) ''
[
# ".null-ls_*"
]
''
"files/folders to never show (by pattern)";
Example: `[".gitignore"]`
'';
neverShow = helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]" ''
Files/folders to never show.
Example: `[".DS_Store" "thumbs.db"]`
'';
neverShowByPattern = helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]" ''
Files/folders to never show (by pattern).
Example: `[".null-ls_*"]`
'';
};
findByFullPathWords = helpers.defaultNullOpts.mkBool false ''

View file

@ -284,7 +284,7 @@ in {
latex = {
commands = helpers.defaultNullOpts.mkNullable (with types; attrsOf str) "{}" ''
List of LATEX commands to be handled by the LATEX parser, listed together with empty arguments
(e.g., "\ref{}", "\documentclass[]{}").
(e.g., `"ref{}"`, `"\documentclass[]{}"`).
This setting is an attrs with the commands as keys and corresponding actions as values.