Skip to content

Commit 640a2f8

Browse files
committed
refactor(#3255): ensure all args passed to api, fix incorrectly documented api interface
1 parent 522db70 commit 640a2f8

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
@@ -2616,9 +2616,12 @@ bulk.trash() *nvim_tree.api.marks.bulk.trash()*
26162616
clear() *nvim_tree.api.marks.clear()*
26172617
Clear all marks.
26182618

2619-
get() *nvim_tree.api.marks.get()*
2619+
get({node}) *nvim_tree.api.marks.get()*
26202620
Return the node if it is marked.
26212621

2622+
Parameters: ~
2623+
{node} (`nvim_tree.api.Node?`) file or directory
2624+
26222625
Return: ~
26232626
(`nvim_tree.api.Node?`)
26242627

@@ -2828,64 +2831,39 @@ open.edit({node}, {opts}) *nvim_tree.api.node.open.edit()*
28282831
{focus}? (`boolean`, default: false) Keep focus in the tree
28292832
when opening the file.
28302833

2831-
open.horizontal({node}, {opts}) *nvim_tree.api.node.open.horizontal()*
2834+
open.horizontal({node}) *nvim_tree.api.node.open.horizontal()*
28322835
Open file in a new horizontal split.
28332836

28342837
Parameters: ~
28352838
{node} (`nvim_tree.api.Node?`) file
2836-
{opts} (`table?`) optional
2837-
• {quit_on_open}? (`boolean`, default: false) Quits the tree
2838-
when opening the file.
2839-
{focus}? (`boolean`, default: false) Keep focus in the tree
2840-
when opening the file.
28412839

28422840
*nvim_tree.api.node.open.horizontal_no_picker()*
2843-
open.horizontal_no_picker({node}, {opts})
2841+
open.horizontal_no_picker({node})
28442842
Open file in a new horizontal split without using the window picker.
28452843

28462844
Parameters: ~
28472845
{node} (`nvim_tree.api.Node?`) file
2848-
{opts} (`table?`) optional
2849-
• {quit_on_open}? (`boolean`, default: false) Quits the tree
2850-
when opening the file.
2851-
{focus}? (`boolean`, default: false) Keep focus in the tree
2852-
when opening the file.
28532846

28542847
*nvim_tree.api.node.open.no_window_picker()*
2855-
open.no_window_picker({node}, {opts})
2848+
open.no_window_picker({node})
28562849
Open file without using the window picker.
28572850

28582851
Parameters: ~
28592852
{node} (`nvim_tree.api.Node?`) file
2860-
{opts} (`table?`) optional
2861-
• {quit_on_open}? (`boolean`, default: false) Quits the tree
2862-
when opening the file.
2863-
{focus}? (`boolean`, default: false) Keep focus in the tree
2864-
when opening the file.
28652853

2866-
open.preview({node}, {opts}) *nvim_tree.api.node.open.preview()*
2854+
open.preview({node}) *nvim_tree.api.node.open.preview()*
28672855
Open file with |'bufhidden'| set to `delete`.
28682856

28692857
Parameters: ~
28702858
{node} (`nvim_tree.api.Node?`) directory or file
2871-
{opts} (`table?`) optional
2872-
• {quit_on_open}? (`boolean`, default: false) Quits the tree
2873-
when opening the file.
2874-
{focus}? (`boolean`, default: false) Keep focus in the tree
2875-
when opening the file.
28762859

28772860
*nvim_tree.api.node.open.preview_no_picker()*
2878-
open.preview_no_picker({node}, {opts})
2861+
open.preview_no_picker({node})
28792862
Open file with |'bufhidden'| set to `delete` without using the window
28802863
picker.
28812864

28822865
Parameters: ~
28832866
{node} (`nvim_tree.api.Node?`) directory or file
2884-
{opts} (`table?`) optional
2885-
• {quit_on_open}? (`boolean`, default: false) Quits the tree
2886-
when opening the file.
2887-
{focus}? (`boolean`, default: false) Keep focus in the tree
2888-
when opening the file.
28892867

28902868
*nvim_tree.api.node.open.replace_tree_buffer()*
28912869
open.replace_tree_buffer({node})
@@ -2894,16 +2872,11 @@ open.replace_tree_buffer({node})
28942872
Parameters: ~
28952873
{node} (`nvim_tree.api.Node?`) file
28962874

2897-
open.tab({node}, {opts}) *nvim_tree.api.node.open.tab()*
2875+
open.tab({node}) *nvim_tree.api.node.open.tab()*
28982876
Open file in a new tab.
28992877

29002878
Parameters: ~
29012879
{node} (`nvim_tree.api.Node?`) directory or file
2902-
{opts} (`table?`) optional
2903-
• {quit_on_open}? (`boolean`, default: false) Quits the tree
2904-
when opening the file.
2905-
{focus}? (`boolean`, default: false) Keep focus in the tree
2906-
when opening the file.
29072880

29082881
open.tab_drop({node}) *nvim_tree.api.node.open.tab_drop()*
29092882
Switch to tab containing window with selected file if it exists. Open file
@@ -2913,40 +2886,25 @@ open.tab_drop({node}) *nvim_tree.api.node.open.tab_drop()*
29132886
{node} (`nvim_tree.api.Node?`) directory or file
29142887

29152888
*nvim_tree.api.node.open.toggle_group_empty()*
2916-
open.toggle_group_empty({node}, {opts})
2889+
open.toggle_group_empty({node})
29172890
Toggle |nvim_tree.config.renderer| {group_empty} for a directory. Needs
29182891
{group_empty} set.
29192892

29202893
Parameters: ~
29212894
{node} (`nvim_tree.api.Node?`) directory
2922-
{opts} (`table?`) optional
2923-
• {quit_on_open}? (`boolean`, default: false) Quits the tree
2924-
when opening the file.
2925-
{focus}? (`boolean`, default: false) Keep focus in the tree
2926-
when opening the file.
29272895

2928-
open.vertical({node}, {opts}) *nvim_tree.api.node.open.vertical()*
2896+
open.vertical({node}) *nvim_tree.api.node.open.vertical()*
29292897
Open file in a new vertical split.
29302898

29312899
Parameters: ~
29322900
{node} (`nvim_tree.api.Node?`) file
2933-
{opts} (`table?`) optional
2934-
• {quit_on_open}? (`boolean`, default: false) Quits the tree
2935-
when opening the file.
2936-
{focus}? (`boolean`, default: false) Keep focus in the tree
2937-
when opening the file.
29382901

29392902
*nvim_tree.api.node.open.vertical_no_picker()*
2940-
open.vertical_no_picker({node}, {opts})
2903+
open.vertical_no_picker({node})
29412904
Open file in a new vertical split without using the window picker.
29422905

29432906
Parameters: ~
29442907
{node} (`nvim_tree.api.Node?`) file
2945-
{opts} (`table?`) optional
2946-
• {quit_on_open}? (`boolean`, default: false) Quits the tree
2947-
when opening the file.
2948-
{focus}? (`boolean`, default: false) Keep focus in the tree
2949-
when opening the file.
29502908

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

0 commit comments

Comments
 (0)