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

View file

@ -284,7 +284,7 @@ in {
latex = { latex = {
commands = helpers.defaultNullOpts.mkNullable (with types; attrsOf str) "{}" '' commands = helpers.defaultNullOpts.mkNullable (with types; attrsOf str) "{}" ''
List of LATEX commands to be handled by the LATEX parser, listed together with empty arguments 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. This setting is an attrs with the commands as keys and corresponding actions as values.