Skip to content

Commit d52fdeb

Browse files
authored
docs: add help indexes (#2684)
* docs: add nvim-tree-index-api * docs: add nvim-tree-index-opts * docs: add nvim-tree-index-api * docs: sort indices * docs: less verbose * docs: use dictionary sort for indices
1 parent 7efaa33 commit d52fdeb

File tree

3 files changed

+303
-0
lines changed

3 files changed

+303
-0
lines changed

CONTRIBUTING.md

+6
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,16 @@ Once you did, you should run `make help-update`
6969

7070
# Documentation
7171

72+
## Opts
73+
7274
When adding new options, you should declare the defaults in the main `nvim-tree.lua` file.
7375

7476
Documentation for options should also be added to `nvim-tree-opts` in `doc/nvim-tree-lua.txt`
7577

78+
## API
79+
80+
When adding or changing API please update :help nvim-tree-api
81+
7682
# Pull Request
7783

7884
Please reference any issues in the description e.g. "resolves #1234".

doc/nvim-tree-lua.txt

+264
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ CONTENTS *nvim-tree*
5757
13. Legacy |nvim-tree-legacy|
5858
13.1 Legacy: Opts |nvim-tree-legacy-opts|
5959
13.2 Legacy: Highlight |nvim-tree-legacy-highlight|
60+
14. Index |nvim-tree-index|
61+
14.1 Index: Opts |nvim-tree-index-opts|
62+
14.2 Index: API |nvim-tree-index-api|
6063

6164
==============================================================================
6265
1. INTRODUCTION *nvim-tree-introduction*
@@ -2710,4 +2713,265 @@ highlight group is not, hard linking as follows: >
27102713
NvimTreeLspDiagnosticsInformationFolderText NvimTreeDiagnosticInfoFolderHL
27112714
NvimTreeLspDiagnosticsHintFolderText NvimTreeDiagnosticHintFolderHL
27122715
<
2716+
==============================================================================
2717+
14 INDEX *nvim-tree-index*
2718+
2719+
==============================================================================
2720+
14.1 INDEX: OPTS *nvim-tree-index-opts*
2721+
2722+
|nvim-tree.actions.change_dir|
2723+
|nvim-tree.actions.change_dir.enable|
2724+
|nvim-tree.actions.change_dir.global|
2725+
|nvim-tree.actions.change_dir.restrict_above_cwd|
2726+
|nvim-tree.actions.expand_all|
2727+
|nvim-tree.actions.expand_all.exclude|
2728+
|nvim-tree.actions.expand_all.max_folder_discovery|
2729+
|nvim-tree.actions.file_popup|
2730+
|nvim-tree.actions.file_popup.open_win_config|
2731+
|nvim-tree.actions.open_file|
2732+
|nvim-tree.actions.open_file.eject|
2733+
|nvim-tree.actions.open_file.quit_on_open|
2734+
|nvim-tree.actions.open_file.resize_window|
2735+
|nvim-tree.actions.open_file.window_picker|
2736+
|nvim-tree.actions.open_file.window_picker.chars|
2737+
|nvim-tree.actions.open_file.window_picker.enable|
2738+
|nvim-tree.actions.open_file.window_picker.exclude|
2739+
|nvim-tree.actions.open_file.window_picker.picker|
2740+
|nvim-tree.actions.remove_file.close_window|
2741+
|nvim-tree.actions.use_system_clipboard|
2742+
|nvim-tree.auto_reload_on_write|
2743+
|nvim-tree.diagnostics.debounce_delay|
2744+
|nvim-tree.diagnostics.enable|
2745+
|nvim-tree.diagnostics.icons|
2746+
|nvim-tree.diagnostics.severity|
2747+
|nvim-tree.diagnostics.severity.max|
2748+
|nvim-tree.diagnostics.severity.min|
2749+
|nvim-tree.diagnostics.show_on_dirs|
2750+
|nvim-tree.diagnostics.show_on_open_dirs|
2751+
|nvim-tree.disable_netrw|
2752+
|nvim-tree.experimental|
2753+
|nvim-tree.filesystem_watchers.debounce_delay|
2754+
|nvim-tree.filesystem_watchers.enable|
2755+
|nvim-tree.filesystem_watchers.ignore_dirs|
2756+
|nvim-tree.filters.custom|
2757+
|nvim-tree.filters.dotfiles|
2758+
|nvim-tree.filters.exclude|
2759+
|nvim-tree.filters.git_clean|
2760+
|nvim-tree.filters.git_ignored|
2761+
|nvim-tree.filters.no_bookmark|
2762+
|nvim-tree.filters.no_buffer|
2763+
|nvim-tree.git.cygwin_support|
2764+
|nvim-tree.git.disable_for_dirs|
2765+
|nvim-tree.git.enable|
2766+
|nvim-tree.git.show_on_dirs|
2767+
|nvim-tree.git.show_on_open_dirs|
2768+
|nvim-tree.git.timeout|
2769+
|nvim-tree.help.sort_by|
2770+
|nvim-tree.hijack_cursor|
2771+
|nvim-tree.hijack_directories.auto_open|
2772+
|nvim-tree.hijack_directories.enable|
2773+
|nvim-tree.hijack_netrw|
2774+
|nvim-tree.hijack_unnamed_buffer_when_opening|
2775+
|nvim-tree.live_filter.always_show_folders|
2776+
|nvim-tree.live_filter.prefix|
2777+
|nvim-tree.log.enable|
2778+
|nvim-tree.log.truncate|
2779+
|nvim-tree.log.types|
2780+
|nvim-tree.log.types.all|
2781+
|nvim-tree.log.types.config|
2782+
|nvim-tree.log.types.copy_paste|
2783+
|nvim-tree.log.types.dev|
2784+
|nvim-tree.log.types.diagnostics|
2785+
|nvim-tree.log.types.git|
2786+
|nvim-tree.log.types.profile|
2787+
|nvim-tree.log.types.watcher|
2788+
|nvim-tree.modified.enable|
2789+
|nvim-tree.modified.show_on_dirs|
2790+
|nvim-tree.modified.show_on_open_dirs|
2791+
|nvim-tree.notify.threshold|
2792+
|nvim-tree.on_attach|
2793+
|nvim-tree.prefer_startup_root|
2794+
|nvim-tree.reload_on_bufenter|
2795+
|nvim-tree.renderer.add_trailing|
2796+
|nvim-tree.renderer.full_name|
2797+
|nvim-tree.renderer.group_empty|
2798+
|nvim-tree.renderer.highlight_bookmarks|
2799+
|nvim-tree.renderer.highlight_clipboard|
2800+
|nvim-tree.renderer.highlight_diagnostics|
2801+
|nvim-tree.renderer.highlight_git|
2802+
|nvim-tree.renderer.highlight_modified|
2803+
|nvim-tree.renderer.highlight_opened_files|
2804+
|nvim-tree.renderer.icons|
2805+
|nvim-tree.renderer.icons.bookmarks_placement|
2806+
|nvim-tree.renderer.icons.diagnostics_placement|
2807+
|nvim-tree.renderer.icons.git_placement|
2808+
|nvim-tree.renderer.icons.glyphs|
2809+
|nvim-tree.renderer.icons.glyphs.default|
2810+
|nvim-tree.renderer.icons.glyphs.folder|
2811+
|nvim-tree.renderer.icons.glyphs.git|
2812+
|nvim-tree.renderer.icons.glyphs.modified|
2813+
|nvim-tree.renderer.icons.glyphs.symlink|
2814+
|nvim-tree.renderer.icons.modified_placement|
2815+
|nvim-tree.renderer.icons.padding|
2816+
|nvim-tree.renderer.icons.show|
2817+
|nvim-tree.renderer.icons.show.bookmarks|
2818+
|nvim-tree.renderer.icons.show.diagnostics|
2819+
|nvim-tree.renderer.icons.show.file|
2820+
|nvim-tree.renderer.icons.show.folder|
2821+
|nvim-tree.renderer.icons.show.folder_arrow|
2822+
|nvim-tree.renderer.icons.show.git|
2823+
|nvim-tree.renderer.icons.show.modified|
2824+
|nvim-tree.renderer.icons.symlink_arrow|
2825+
|nvim-tree.renderer.icons.web_devicons|
2826+
|nvim-tree.renderer.icons.web_devicons.file|
2827+
|nvim-tree.renderer.icons.web_devicons.file.color|
2828+
|nvim-tree.renderer.icons.web_devicons.file.enable|
2829+
|nvim-tree.renderer.icons.web_devicons.folder|
2830+
|nvim-tree.renderer.icons.web_devicons.folder.color|
2831+
|nvim-tree.renderer.icons.web_devicons.folder.enable|
2832+
|nvim-tree.renderer.indent_markers|
2833+
|nvim-tree.renderer.indent_markers.enable|
2834+
|nvim-tree.renderer.indent_markers.icons|
2835+
|nvim-tree.renderer.indent_markers.inline_arrows|
2836+
|nvim-tree.renderer.indent_width|
2837+
|nvim-tree.renderer.root_folder_label|
2838+
|nvim-tree.renderer.special_files|
2839+
|nvim-tree.renderer.symlink_destination|
2840+
|nvim-tree.respect_buf_cwd|
2841+
|nvim-tree.root_dirs|
2842+
|nvim-tree.select_prompts|
2843+
|nvim-tree.sort.files_first|
2844+
|nvim-tree.sort.folders_first|
2845+
|nvim-tree.sort.sorter|
2846+
|nvim-tree.sync_root_with_cwd|
2847+
|nvim-tree.system_open.args|
2848+
|nvim-tree.system_open.cmd|
2849+
|nvim-tree.tab.sync|
2850+
|nvim-tree.tab.sync.close|
2851+
|nvim-tree.tab.sync.ignore|
2852+
|nvim-tree.tab.sync.open|
2853+
|nvim-tree.trash.cmd|
2854+
|nvim-tree.ui.confirm|
2855+
|nvim-tree.ui.confirm.default_yes|
2856+
|nvim-tree.ui.confirm.remove|
2857+
|nvim-tree.ui.confirm.trash|
2858+
|nvim-tree.update_focused_file.enable|
2859+
|nvim-tree.update_focused_file.ignore_list|
2860+
|nvim-tree.update_focused_file.update_root|
2861+
|nvim-tree.view.centralize_selection|
2862+
|nvim-tree.view.cursorline|
2863+
|nvim-tree.view.debounce_delay|
2864+
|nvim-tree.view.float|
2865+
|nvim-tree.view.float.enable|
2866+
|nvim-tree.view.float.open_win_config|
2867+
|nvim-tree.view.float.quit_on_focus_loss|
2868+
|nvim-tree.view.number|
2869+
|nvim-tree.view.preserve_window_proportions|
2870+
|nvim-tree.view.relativenumber|
2871+
|nvim-tree.view.side|
2872+
|nvim-tree.view.signcolumn|
2873+
|nvim-tree.view.width|
2874+
|nvim-tree.view.width.max|
2875+
|nvim-tree.view.width.min|
2876+
|nvim-tree.view.width.padding|
2877+
2878+
==============================================================================
2879+
14.2 INDEX: API *nvim-tree-index-api*
2880+
2881+
|nvim-tree-api.commands.get()|
2882+
|nvim-tree-api.config.mappings.default_on_attach()|
2883+
|nvim-tree-api.config.mappings.get_keymap()|
2884+
|nvim-tree-api.config.mappings.get_keymap_default()|
2885+
|nvim-tree-api.diagnostics.hi_test()|
2886+
|nvim-tree-api.events.subscribe()|
2887+
|nvim-tree-api.fs.clear_clipboard()|
2888+
|nvim-tree-api.fs.copy.absolute_path()|
2889+
|nvim-tree-api.fs.copy.filename()|
2890+
|nvim-tree-api.fs.copy.node()|
2891+
|nvim-tree-api.fs.copy.relative_path()|
2892+
|nvim-tree-api.fs.create()|
2893+
|nvim-tree-api.fs.cut()|
2894+
|nvim-tree-api.fs.paste()|
2895+
|nvim-tree-api.fs.print_clipboard()|
2896+
|nvim-tree-api.fs.remove()|
2897+
|nvim-tree-api.fs.rename()|
2898+
|nvim-tree-api.fs.rename_basename()|
2899+
|nvim-tree-api.fs.rename_full()|
2900+
|nvim-tree-api.fs.rename_node()|
2901+
|nvim-tree-api.fs.rename_sub()|
2902+
|nvim-tree-api.fs.trash()|
2903+
|nvim-tree-api.git.reload()|
2904+
|nvim-tree-api.live_filter.clear()|
2905+
|nvim-tree-api.live_filter.start()|
2906+
|nvim-tree-api.marks.bulk.delete()|
2907+
|nvim-tree-api.marks.bulk.move()|
2908+
|nvim-tree-api.marks.bulk.trash()|
2909+
|nvim-tree-api.marks.clear()|
2910+
|nvim-tree-api.marks.get()|
2911+
|nvim-tree-api.marks.list()|
2912+
|nvim-tree-api.marks.navigate.next()|
2913+
|nvim-tree-api.marks.navigate.prev()|
2914+
|nvim-tree-api.marks.navigate.select()|
2915+
|nvim-tree-api.marks.toggle()|
2916+
|nvim-tree-api.node.navigate.diagnostics.next()|
2917+
|nvim-tree-api.node.navigate.diagnostics.next_recursive()|
2918+
|nvim-tree-api.node.navigate.diagnostics.prev()|
2919+
|nvim-tree-api.node.navigate.diagnostics.prev_recursive()|
2920+
|nvim-tree-api.node.navigate.git.next()|
2921+
|nvim-tree-api.node.navigate.git.next_recursive()|
2922+
|nvim-tree-api.node.navigate.git.next_skip_gitignored()|
2923+
|nvim-tree-api.node.navigate.git.prev()|
2924+
|nvim-tree-api.node.navigate.git.prev_recursive()|
2925+
|nvim-tree-api.node.navigate.git.prev_skip_gitignored()|
2926+
|nvim-tree-api.node.navigate.opened.next()|
2927+
|nvim-tree-api.node.navigate.opened.prev()|
2928+
|nvim-tree-api.node.navigate.parent()|
2929+
|nvim-tree-api.node.navigate.parent_close()|
2930+
|nvim-tree-api.node.navigate.sibling.first()|
2931+
|nvim-tree-api.node.navigate.sibling.last()|
2932+
|nvim-tree-api.node.navigate.sibling.next()|
2933+
|nvim-tree-api.node.navigate.sibling.prev()|
2934+
|nvim-tree-api.node.open.drop()|
2935+
|nvim-tree-api.node.open.edit()|
2936+
|nvim-tree-api.node.open.horizontal()|
2937+
|nvim-tree-api.node.open.no_window_picker()|
2938+
|nvim-tree-api.node.open.preview()|
2939+
|nvim-tree-api.node.open.preview_no_picker()|
2940+
|nvim-tree-api.node.open.replace_tree_buffer()|
2941+
|nvim-tree-api.node.open.tab()|
2942+
|nvim-tree-api.node.open.tab_drop()|
2943+
|nvim-tree-api.node.open.toggle_group_empty()|
2944+
|nvim-tree-api.node.open.vertical()|
2945+
|nvim-tree-api.node.run.cmd()|
2946+
|nvim-tree-api.node.run.system()|
2947+
|nvim-tree-api.node.show_info_popup()|
2948+
|nvim-tree-api.tree.change_root()|
2949+
|nvim-tree-api.tree.change_root_to_node()|
2950+
|nvim-tree-api.tree.change_root_to_parent()|
2951+
|nvim-tree-api.tree.close()|
2952+
|nvim-tree-api.tree.close_in_all_tabs()|
2953+
|nvim-tree-api.tree.close_in_this_tab()|
2954+
|nvim-tree-api.tree.collapse_all()|
2955+
|nvim-tree-api.tree.expand_all()|
2956+
|nvim-tree-api.tree.find_file()|
2957+
|nvim-tree-api.tree.focus()|
2958+
|nvim-tree-api.tree.get_nodes()|
2959+
|nvim-tree-api.tree.get_node_under_cursor()|
2960+
|nvim-tree-api.tree.is_tree_buf()|
2961+
|nvim-tree-api.tree.is_visible()|
2962+
|nvim-tree-api.tree.open()|
2963+
|nvim-tree-api.tree.reload()|
2964+
|nvim-tree-api.tree.search_node()|
2965+
|nvim-tree-api.tree.toggle()|
2966+
|nvim-tree-api.tree.toggle_custom_filter()|
2967+
|nvim-tree-api.tree.toggle_git_clean_filter()|
2968+
|nvim-tree-api.tree.toggle_gitignore_filter()|
2969+
|nvim-tree-api.tree.toggle_help()|
2970+
|nvim-tree-api.tree.toggle_hidden_filter()|
2971+
|nvim-tree-api.tree.toggle_no_bookmark_filter()|
2972+
|nvim-tree-api.tree.toggle_no_buffer_filter()|
2973+
|nvim-tree-api.tree.winid()|
2974+
2975+
==============================================================================
2976+
27132977
vim:tw=78:ts=4:sw=4:et:ft=help:norl:

scripts/help-update.sh

+33
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,39 @@ sed -e "s/^ / /" /tmp/DEFAULT_OPTS.2.lua > /tmp/DEFAULT_OPTS.6.lua
2121
sed -i -e "/${begin}/,/${end}/{ /${begin}/{p; r /tmp/DEFAULT_OPTS.6.lua
2222
}; /${end}/p; d; }" doc/nvim-tree-lua.txt
2323

24+
25+
#
26+
# opts index
27+
#
28+
begin="nvim-tree-index-opts\*"
29+
end="====================="
30+
31+
printf '\n' > /tmp/index-opts.txt
32+
sed -E "
33+
/^ *\*(nvim-tree\..*)\*$/! d ;
34+
s/^.*\*(.*)\*/|\1|/g
35+
" doc/nvim-tree-lua.txt | sort -d >> /tmp/index-opts.txt
36+
printf '\n' >> /tmp/index-opts.txt
37+
38+
sed -i -e "/${begin}/,/${end}/{ /${begin}/{p; r /tmp/index-opts.txt
39+
}; /${end}/p; d; }" doc/nvim-tree-lua.txt
40+
41+
#
42+
# api index
43+
#
44+
begin="nvim-tree-index-api\*"
45+
end="====================="
46+
47+
printf '\n' > /tmp/index-api.txt
48+
sed -E "
49+
/\*(nvim-tree-api.*\(\))\*/! d ;
50+
s/^.*\*(.*)\*/|\1|/g
51+
" doc/nvim-tree-lua.txt | sort -d >> /tmp/index-api.txt
52+
printf '\n' >> /tmp/index-api.txt
53+
54+
sed -i -e "/${begin}/,/${end}/{ /${begin}/{p; r /tmp/index-api.txt
55+
}; /${end}/p; d; }" doc/nvim-tree-lua.txt
56+
2457
#
2558
# DEFAULT_ON_ATTACH
2659
#

0 commit comments

Comments
 (0)