doc: setup call is only allowed once
This commit is contained in:
@@ -33,8 +33,11 @@ use {
|
|||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
Setup should be run in a lua file or in a lua heredoc (`:help lua-heredoc`) if using in a vim file.
|
Setup should be run in a lua file or in a lua heredoc (`:help lua-heredoc`) if using in a vim file.
|
||||||
|
|
||||||
Legacy `g:` options have been migrated to the setup function. See [this issue](https://github.com/kyazdani42/nvim-tree.lua/issues/674) for information on migrating your configuration.
|
Legacy `g:` options have been migrated to the setup function. See [this issue](https://github.com/kyazdani42/nvim-tree.lua/issues/674) for information on migrating your configuration.
|
||||||
|
|
||||||
|
Setup may only be run once; subsequent calls will result in a warning. Do not invoke from, say, a packer config function and then call it again later.
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
" vimrc
|
" vimrc
|
||||||
nnoremap <C-n> :NvimTreeToggle<CR>
|
nnoremap <C-n> :NvimTreeToggle<CR>
|
||||||
|
|||||||
@@ -83,6 +83,9 @@ SETUP *nvim-tree.setup*
|
|||||||
To configure the tree (and make it runnable), you should call the setup
|
To configure the tree (and make it runnable), you should call the setup
|
||||||
function.
|
function.
|
||||||
|
|
||||||
|
Setup may only be run once; subsequent calls will result in a warning. Do not
|
||||||
|
invoke from, say, a packer config function and then call it again later.
|
||||||
|
|
||||||
Values may be functions. Warning: this may result in unexpected behaviour.
|
Values may be functions. Warning: this may result in unexpected behaviour.
|
||||||
>
|
>
|
||||||
require("nvim-tree").setup { -- BEGIN_DEFAULT_OPTS
|
require("nvim-tree").setup { -- BEGIN_DEFAULT_OPTS
|
||||||
|
|||||||
Reference in New Issue
Block a user