Skip to content

Commit

Permalink
docs: add nvim-tree-index-api
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-courtis committed Feb 24, 2024
1 parent b85d05d commit 627e5fd
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 25 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Documentation for options should also be added to `nvim-tree-opts` in `doc/nvim-

## API

When adding or changing API please update :help nvim-tree-api and generate the index via `scripts/help-index-api.sh`
When adding or changing API please update :help nvim-tree-api

# Pull Request

Expand Down
25 changes: 2 additions & 23 deletions doc/nvim-tree-lua.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2883,9 +2883,6 @@ highlight group is not, hard linking as follows: >
==============================================================================
14.2 INDEX: API *nvim-tree-index-api*

|nvim-tree-api|

|nvim-tree-api.tree|
|nvim-tree-api.tree.open()|
|nvim-tree-api.tree.toggle()|
|nvim-tree-api.tree.close()|
Expand All @@ -2912,8 +2909,6 @@ highlight group is not, hard linking as follows: >
|nvim-tree-api.tree.is_tree_buf()|
|nvim-tree-api.tree.is_visible()|
|nvim-tree-api.tree.winid()|

|nvim-tree-api.fs|
|nvim-tree-api.fs.create()|
|nvim-tree-api.fs.remove()|
|nvim-tree-api.fs.trash()|
Expand All @@ -2930,8 +2925,6 @@ highlight group is not, hard linking as follows: >
|nvim-tree-api.fs.copy.relative_path()|
|nvim-tree-api.fs.clear_clipboard()|
|nvim-tree-api.fs.print_clipboard()|

|nvim-tree-api.node|
|nvim-tree-api.node.open.edit()|
|nvim-tree-api.node.open.replace_tree_buffer()|
|nvim-tree-api.node.open.no_window_picker()|
Expand Down Expand Up @@ -2964,20 +2957,10 @@ highlight group is not, hard linking as follows: >
|nvim-tree-api.node.show_info_popup()|
|nvim-tree-api.node.run.cmd()|
|nvim-tree-api.node.run.system()|

|nvim-tree-api.git|
|nvim-tree-api.git.reload()|

|nvim-tree-api.events|
|nvim-tree-api.events.subscribe()|

|nvim-tree-api.events.Event|

|nvim-tree-api.live_filter|
|nvim-tree-api.live_filter.start()|
|nvim-tree-api.live_filter.clear()|

|nvim-tree-api.marks|
|nvim-tree-api.marks.get()|
|nvim-tree-api.marks.list()|
|nvim-tree-api.marks.toggle()|
Expand All @@ -2988,16 +2971,12 @@ highlight group is not, hard linking as follows: >
|nvim-tree-api.marks.navigate.next()|
|nvim-tree-api.marks.navigate.prev()|
|nvim-tree-api.marks.navigate.select()|

|nvim-tree-api.config|
|nvim-tree-api.config.mappings.default_on_attach()|
|nvim-tree-api.config.mappings.get_keymap()|
|nvim-tree-api.config.mappings.get_keymap_default()|

|nvim-tree-api.commands|
|nvim-tree-api.commands.get()|

|nvim-tree-api.diagnostics|
|nvim-tree-api.diagnostics.hi_test()|

==============================================================================

vim:tw=78:ts=4:sw=4:et:ft=help:norl:
17 changes: 16 additions & 1 deletion scripts/help-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ sed -i -e "/${begin}/,/${end}/{ /${begin}/{p; r /tmp/DEFAULT_OPTS.6.lua
begin="nvim-tree-index-opts\*"
end="====================="

# generate
printf '\n' > /tmp/index-opts.txt
sed -E "
/^ *\*(nvim-tree\..*)\*$/! d ;
Expand All @@ -39,6 +38,22 @@ printf '\n' >> /tmp/index-opts.txt
sed -i -e "/${begin}/,/${end}/{ /${begin}/{p; r /tmp/index-opts.txt
}; /${end}/p; d; }" doc/nvim-tree-lua.txt

#
# api index
#
begin="nvim-tree-index-api\*"
end="====================="

printf '\n' > /tmp/index-api.txt
sed -E "
/\*(nvim-tree-api.*\(\))\*/! d ;
s/^.*\*(.*)\*/|\1|/g
" doc/nvim-tree-lua.txt >> /tmp/index-api.txt
printf '\n' >> /tmp/index-api.txt

sed -i -e "/${begin}/,/${end}/{ /${begin}/{p; r /tmp/index-api.txt
}; /${end}/p; d; }" doc/nvim-tree-lua.txt

#
# DEFAULT_ON_ATTACH
#
Expand Down

0 comments on commit 627e5fd

Please sign in to comment.