File logging (#1053)

* add file logging infrastructure

* log git runner operations

* log configuration and mappings

* document file logging infrastructure

* style fixes

* stylua fixes

* document log file locations
This commit is contained in:
Alexander Courtis
2022-03-07 18:44:37 +11:00
committed by GitHub
parent 0816064a8b
commit 19075f41e8
6 changed files with 148 additions and 17 deletions

View File

@@ -186,7 +186,15 @@ require'nvim-tree'.setup {
}
}
}
}
},
log = {
enable = false,
types = {
all = false,
config = false,
git = false,
},
},
}
```
@@ -307,6 +315,11 @@ You can toggle the help UI by pressing `g?`.
3. `toggle` has a second parameter which allows to toggle without focusing the explorer (`require"nvim-tree.toggle(false, false)`).
4. You can allow nvim-tree to behave like vinegar (see `:help nvim-tree-vinegar`).
## Diagnostic Logging
You may enable diagnostic logging and a file `nvim-tree-HH:MM:SS-username.log` will be created in `$XDG_CACHE_HOME/nvim`, usually `~/.cache/nvim`, containing logs from that nvim session. See `:help nvim-tree.log`.
The files may become large and numerous, so it is advised to turn on logging to diagnose an issue or while reporting a bug, then turn it off.
## Screenshots