doc: eager netrw disabling

This commit is contained in:
Alexander Courtis 2022-09-11 11:41:12 +10:00
parent 3e49d9b748
commit fb8735e96c
2 changed files with 19 additions and 1 deletions

View File

@ -57,6 +57,10 @@ Setup should be run in a lua file or in a lua heredoc [:help lua-heredoc](https:
```lua
-- examples for your init.lua
-- disable netrw at the very start of your init.lua (strongly advised)
vim.g.loaded = 1
vim.g.loaded_netrwPlugin = 1
-- empty setup using defaults
require("nvim-tree").setup()
@ -121,10 +125,14 @@ nvim-tree comes with number of mappings; for default mappings please see [:help
## Troubleshooting
### Diagnostic Logging
## Diagnostic Logging
You may enable diagnostic logging to `$XDG_CACHE_HOME/nvim/nvim-tree.log`. See [:help nvim-tree.log](doc/nvim-tree-lua.txt)
## netrw Keeps Popping Up
Eagerly disable netrw. See [:help nvim-tree.disable_netrw](doc/nvim-tree-lua.txt)
## Performance Issues
If you are experiencing performance issues with nvim-tree.lua, you can enable profiling in the logs. It is advisable to enable git logging at the same time, as that can be a source of performance problems.

View File

@ -65,6 +65,10 @@ Setup should be run in a lua file or in a |lua-heredoc| if using in a vim file.
-- examples for your init.lua
-- disable netrw at the very start of your init.lua (strongly advised)
vim.g.loaded = 1
vim.g.loaded_netrwPlugin = 1
-- empty setup using defaults
require("nvim-tree").setup()
@ -371,6 +375,12 @@ Here is a list of the options available in the setup call:
Completely disable netrw
Type: `boolean`, Default: `false`
It is strongly advised to eagerly disable netrw, due to race conditions at vim
startup.
Set the following at the very beginning of your `init.lua` / `init.vim`: >
vim.g.loaded = 1
vim.g.loaded_netrwPlugin = 1
<
*nvim-tree.hijack_netrw*
Hijack netrw windows (overridden if |disable_netrw| is `true`)
Type: `boolean`, Default: `true`