Skip to content

Commit 6e4b3b1

Browse files
committed
doc: clarify setup() expense and purpose
1 parent 851ed88 commit 6e4b3b1

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

doc/nvim-tree-lua.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,17 @@ Setup should be run in a lua file or in a |lua-heredoc| if using in a vim file.
170170
==============================================================================
171171
4. SETUP *nvim-tree-setup*
172172

173-
You must run setup() function to initialise nvim-tree.
173+
You must run setup() function once to initialise nvim-tree. It may be called
174+
again to apply a change in configuration without restarting nvim.
174175

175176
setup() function takes one optional argument: configuration table. If omitted
176177
nvim-tree will be initialised with default configuration.
178+
>
179+
The first setup() call is cheap: it does nothing more than validate / apply
180+
the configuration. Nothing happens until the tree is first opened.
177181

178-
Subsequent calls to setup will replace the previous configuration.
182+
Subsequent setup() calls are expensive as they tear down the world before
183+
applying configuration.
179184
>
180185
require("nvim-tree").setup { -- BEGIN_DEFAULT_OPTS
181186
auto_reload_on_write = true,

0 commit comments

Comments
 (0)