explaingit

nvim-tree/nvim-tree.lua

8,495LuaAudience · developerComplexity · 2/5Setup · moderate

TLDR

nvim-tree adds a file browser sidebar to Neovim, like VS Code's file explorer, letting you browse, open, create, rename, and delete files without leaving the editor, with Git status icons built in.

Mindmap

mindmap
  root((nvim-tree))
    Features
      File browser sidebar
      Git status icons
      LSP diagnostics
    File operations
      Create new files
      Rename and move
      Copy and delete
    Configuration
      Custom keybindings
      Panel width
      Dotfiles toggle
    Setup
      Lua config file
      Package manager
      Nerd Font icons
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Browse and open project files in Neovim using a sidebar tree panel without switching to the terminal.

USE CASE 2

See at a glance which files have been modified or added compared to the last Git commit, directly in the sidebar.

USE CASE 3

Create, rename, move, copy, and delete files from within the editor using keyboard shortcuts.

Tech stack

LuaNeovim

Getting it running

Difficulty · moderate Time to first run · 30min

Requires a Nerd Font installed in your terminal for file type icons, must disable Neovim's built-in netrw file browser to avoid conflicts.

In plain English

nvim-tree is a plugin for Neovim, a keyboard-driven text editor popular among developers. It adds a file browser panel to the editor, the kind that most graphical code editors show on the left side of the screen, listing your project folders and files in a tree structure that you can expand, collapse, and navigate. From the panel, you can open files, create new ones, rename, move, copy, paste, or delete them, all without leaving the editor. The plugin shows icons for different file types if you have a compatible font installed. It also shows Git status indicators next to files so you can see at a glance which files have been modified, added, or deleted compared to the last commit. There is also integration with language server diagnostics, which means warning and error markers can appear next to files that have coding issues. You can filter the file tree to find specific files quickly, and the view updates automatically when files on disk change. The plugin is highly configurable: you can adjust the panel width, control how files are sorted, choose whether to show or hide dotfiles, and remap all the keyboard shortcuts to your own preferences. Setup involves adding the plugin through your Neovim package manager and calling a setup function in your configuration file. The project recommends disabling Neovim's built-in file browser first to avoid conflicts. The maintainers describe the plugin as stable and focused on quality-of-life improvements and bug fixes rather than new major features. A public programming interface is available for users who want to build custom behavior on top of it. The project is written in Lua, the scripting language Neovim uses for plugins.

Copy-paste prompts

Prompt 1
Add nvim-tree to my Neovim config using lazy.nvim and configure it to open automatically when I launch Neovim in a directory.
Prompt 2
Configure nvim-tree to show hidden dotfiles, sort folders before files, and set the panel width to 40 columns.
Prompt 3
How do I remap nvim-tree keybindings so Ctrl+E toggles the tree and standard keys handle file create, rename, and delete?
Prompt 4
Set up nvim-tree to show Git status indicators and LSP diagnostic error icons next to files in the sidebar.
Prompt 5
What do I need to add to my Neovim init.lua to disable the built-in netrw and use nvim-tree instead?
Open on GitHub → Explain another repo

← nvim-tree on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.