gitmyhub

nvim-tree.lua

Lua ★ 8.6k updated 1d ago

A file explorer tree for neovim written in lua

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.

LuaNeovimsetup: moderatecomplexity 2/5

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.

Where it fits