Skip to content

Commit 15a3487

Browse files
committed
refactor(#3255): ensure all args passed to api, fix incorrectly documented api interface
1 parent 9491a40 commit 15a3487

File tree

1 file changed

+13
-55
lines changed

1 file changed

+13
-55
lines changed

doc/nvim-tree-lua.txt

Lines changed: 13 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -2608,9 +2608,12 @@ bulk.trash() *nvim_tree.api.marks.bulk.trash()*
26082608
clear() *nvim_tree.api.marks.clear()*
26092609
Clear all marks.
26102610

2611-
get() *nvim_tree.api.marks.get()*
2611+
get({node}) *nvim_tree.api.marks.get()*
26122612
Return the node if it is marked.
26132613

2614+
Parameters: ~
2615+
{node} (`nvim_tree.api.Node?`) file or directory
2616+
26142617
Return: ~
26152618
(`nvim_tree.api.Node?`)
26162619

@@ -2820,64 +2823,39 @@ open.edit({node}, {opts}) *nvim_tree.api.node.open.edit()*
28202823
{focus}? (`boolean`, default: false) Keep focus in the tree
28212824
when opening the file.
28222825

2823-
open.horizontal({node}, {opts}) *nvim_tree.api.node.open.horizontal()*
2826+
open.horizontal({node}) *nvim_tree.api.node.open.horizontal()*
28242827
Open file in a new horizontal split.
28252828

28262829
Parameters: ~
28272830
{node} (`nvim_tree.api.Node?`) file
2828-
{opts} (`table?`) optional
2829-
• {quit_on_open}? (`boolean`, default: false) Quits the tree
2830-
when opening the file.
2831-
{focus}? (`boolean`, default: false) Keep focus in the tree
2832-
when opening the file.
28332831

28342832
*nvim_tree.api.node.open.horizontal_no_picker()*
2835-
open.horizontal_no_picker({node}, {opts})
2833+
open.horizontal_no_picker({node})
28362834
Open file in a new horizontal split without using the window picker.
28372835

28382836
Parameters: ~
28392837
{node} (`nvim_tree.api.Node?`) file
2840-
{opts} (`table?`) optional
2841-
• {quit_on_open}? (`boolean`, default: false) Quits the tree
2842-
when opening the file.
2843-
{focus}? (`boolean`, default: false) Keep focus in the tree
2844-
when opening the file.
28452838

28462839
*nvim_tree.api.node.open.no_window_picker()*
2847-
open.no_window_picker({node}, {opts})
2840+
open.no_window_picker({node})
28482841
Open file without using the window picker.
28492842

28502843
Parameters: ~
28512844
{node} (`nvim_tree.api.Node?`) file
2852-
{opts} (`table?`) optional
2853-
• {quit_on_open}? (`boolean`, default: false) Quits the tree
2854-
when opening the file.
2855-
{focus}? (`boolean`, default: false) Keep focus in the tree
2856-
when opening the file.
28572845

2858-
open.preview({node}, {opts}) *nvim_tree.api.node.open.preview()*
2846+
open.preview({node}) *nvim_tree.api.node.open.preview()*
28592847
Open file with |'bufhidden'| set to `delete`.
28602848

28612849
Parameters: ~
28622850
{node} (`nvim_tree.api.Node?`) directory or file
2863-
{opts} (`table?`) optional
2864-
• {quit_on_open}? (`boolean`, default: false) Quits the tree
2865-
when opening the file.
2866-
{focus}? (`boolean`, default: false) Keep focus in the tree
2867-
when opening the file.
28682851

28692852
*nvim_tree.api.node.open.preview_no_picker()*
2870-
open.preview_no_picker({node}, {opts})
2853+
open.preview_no_picker({node})
28712854
Open file with |'bufhidden'| set to `delete` without using the window
28722855
picker.
28732856

28742857
Parameters: ~
28752858
{node} (`nvim_tree.api.Node?`) directory or file
2876-
{opts} (`table?`) optional
2877-
• {quit_on_open}? (`boolean`, default: false) Quits the tree
2878-
when opening the file.
2879-
{focus}? (`boolean`, default: false) Keep focus in the tree
2880-
when opening the file.
28812859

28822860
*nvim_tree.api.node.open.replace_tree_buffer()*
28832861
open.replace_tree_buffer({node})
@@ -2886,16 +2864,11 @@ open.replace_tree_buffer({node})
28862864
Parameters: ~
28872865
{node} (`nvim_tree.api.Node?`) file
28882866

2889-
open.tab({node}, {opts}) *nvim_tree.api.node.open.tab()*
2867+
open.tab({node}) *nvim_tree.api.node.open.tab()*
28902868
Open file in a new tab.
28912869

28922870
Parameters: ~
28932871
{node} (`nvim_tree.api.Node?`) directory or file
2894-
{opts} (`table?`) optional
2895-
• {quit_on_open}? (`boolean`, default: false) Quits the tree
2896-
when opening the file.
2897-
{focus}? (`boolean`, default: false) Keep focus in the tree
2898-
when opening the file.
28992872

29002873
open.tab_drop({node}) *nvim_tree.api.node.open.tab_drop()*
29012874
Switch to tab containing window with selected file if it exists. Open file
@@ -2905,40 +2878,25 @@ open.tab_drop({node}) *nvim_tree.api.node.open.tab_drop()*
29052878
{node} (`nvim_tree.api.Node?`) directory or file
29062879

29072880
*nvim_tree.api.node.open.toggle_group_empty()*
2908-
open.toggle_group_empty({node}, {opts})
2881+
open.toggle_group_empty({node})
29092882
Toggle |nvim_tree.config.renderer| {group_empty} for a directory. Needs
29102883
{group_empty} set.
29112884

29122885
Parameters: ~
29132886
{node} (`nvim_tree.api.Node?`) directory
2914-
{opts} (`table?`) optional
2915-
• {quit_on_open}? (`boolean`, default: false) Quits the tree
2916-
when opening the file.
2917-
{focus}? (`boolean`, default: false) Keep focus in the tree
2918-
when opening the file.
29192887

2920-
open.vertical({node}, {opts}) *nvim_tree.api.node.open.vertical()*
2888+
open.vertical({node}) *nvim_tree.api.node.open.vertical()*
29212889
Open file in a new vertical split.
29222890

29232891
Parameters: ~
29242892
{node} (`nvim_tree.api.Node?`) file
2925-
{opts} (`table?`) optional
2926-
• {quit_on_open}? (`boolean`, default: false) Quits the tree
2927-
when opening the file.
2928-
{focus}? (`boolean`, default: false) Keep focus in the tree
2929-
when opening the file.
29302893

29312894
*nvim_tree.api.node.open.vertical_no_picker()*
2932-
open.vertical_no_picker({node}, {opts})
2895+
open.vertical_no_picker({node})
29332896
Open file in a new vertical split without using the window picker.
29342897

29352898
Parameters: ~
29362899
{node} (`nvim_tree.api.Node?`) file
2937-
{opts} (`table?`) optional
2938-
• {quit_on_open}? (`boolean`, default: false) Quits the tree
2939-
when opening the file.
2940-
{focus}? (`boolean`, default: false) Keep focus in the tree
2941-
when opening the file.
29422900

29432901
run.cmd({node}) *nvim_tree.api.node.run.cmd()*
29442902
Enter |cmdline| with the full path of the node and the cursor at the start

0 commit comments

Comments
 (0)