Skip to content
Alexander Courtis edited this page Oct 21, 2023 · 19 revisions

Getting Started

Fork this repo and read through CONTRIBUTING.md

Clean Room

It is strongly advised to develop in a "clean room" using the minimal configuration, so that your plugins and other customisations don't interfere with nvim-tree.

See bug report for some background on the minimal configuration.

cp .github/ISSUE_TEMPLATE/nvt-min.lua /tmp

Change

      "nvim-tree/nvim-tree.lua",

to your fork e.g.

      "~/src/nvim-tree.lua.myfork",

Run with

nvim -nu /tmp/nvt-min.lua

Debug Logging

Using print can be a little problematic when there are many messages.

See :help nvim-tree.log

Enable dev type:

    log = {
      enable = true,
      truncate = true,
      types = {
        all = false,
        config = false,
        copy_paste = false,
        dev = true,
        diagnostics = false,
        git = false,
        profile = false,
        watcher = false,
      },
    },

Require the logger:

local log = require "nvim-tree.log"

Add string.format style log lines e.g.:

log.line("dev", "do_copy uid %d '%s' -> '%s'", source_stats.uid, source, destination)

Watch:

tail -F ${XDG_STATE_HOME}/nvim/nvim-tree.log

Re-running setup

Setup may be run many times by the user and you are encouraged to test it.

:lua _G.setup()

OS Feature Flags

Script run by various users ~2023 10 to evaluate vim.fn.has for all known feature flags from src/nvim/eval/funcs.c

Notable:

Linux

linux=1
macunix=0
unix=1
win32=0
win64=0
wsl=0

WSL

linux=1
macunix=0
unix=1
win32=0
win64=0
wsl=1

PowerShell

linux=0
macunix=0
unix=0
win32=1
win64=1
wsl=0

nvim-qt also: gui_running=1

macOS

Unknown

Cygwin

Unknown

msys2

Unknown

Clone this wiki locally