Skip to content
Alexander Courtis edited this page Dec 15, 2022 · 17 revisions

Diagnostic Logging

You may enable diagnostic logging to nvim's cache standard-path. See :help nvim-tree.log and :help standard-path.

This is usually $XDG_CACHE_HOME/nvim/nvim-tree.log. Use :echo stdpath("cache") to confirm the location on your system.

Performance Issues

If you are experiencing performance issues please enable profiling.

It is advisable to enable git logging at the same time, as that can be a source of performance problems.

log = {
  enable = true,
  truncate = true,
  types = {
    diagnostics = true,
    git = true,
    profile = true,
    watcher = true,
  },
},

Please attach $XDG_CACHE_HOME/nvim/nvim-tree.log if you raise an issue.

Performance Tips

Fish

If you are using fish as an editor shell (which might be fixed in the future), try set shell=/bin/bash in your vim config. Alternatively, you can prevent fish from loading interactive configuration in a non-interactive shell.

Git Timeouts

Huge git repositories may timeout after the default git.timeout of 400ms. Try increasing that in your setup if you see [git] job timed out in the logs.

Try manually running the git command (see the logs) in your shell e.g. git --no-optional-locks status --porcelain=v1 --ignored=matching -u.

Try temporarily disabling git integration by setting git.enable = false

Git fsmonitor Daemon

MacOS and some Windows users may enable git's file system monitor daemon to greatly improve performance. See Improve Git monorepo performance with a file system monitor.

Unfortunately this is not available for Linux.

Enable for your repo:

git config core.fsmonitor true
git config core.untrackedcache true

Icons Not Correctly Shown

Your terminal emulator must be configured to use the patched font such as "Hack Nerd Font".

Linux

The patched font can be configured as the default monospace font, which terminal emulators, browsers etc. will likely use. See Font configuration for further information.

Example ~/.config/fontconfig/fonts.conf

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
    <alias>
        <family>monospace</family>
        <prefer>
            <family>Hack Nerd Font</family>
        </prefer>
    </alias>
</fontconfig>

You can validate this configuration:

:; fc-match monospace
Hack Regular Nerd Font Complete.ttf: "Hack Nerd Font" "Regular"
Clone this wiki locally