Minimal file explorer for Neovim. ~800 lines of Lua.
-- lazy.nvim
{ "0ax1/tree.nvim" }require("tree").setup({
width = 30, -- sidebar width (default 30)
arrows = { open = "▾", closed = "▸" }, -- directory indicators
})
vim.keymap.set("n", "<c-n>", "<cmd>Tree<cr>")| Key | Action |
|---|---|
<CR> o l |
Open file / toggle directory |
h |
Close directory or go to parent |
s |
Open in horizontal split |
v |
Open in vertical split |
a |
Create file or directory (end name with /) |
d |
Delete (with confirmation) |
r |
Rename |
y x p |
Copy / cut / paste |
R |
Refresh |
<C-]> |
cd into directory |
- |
cd up to parent |
q |
Close tree |
- Filesystem watching via libuv (debounced, per expanded directory)
- Auto-reveal: tree follows the current buffer
- Configurable directory arrows
All highlight groups can be overridden:
| Group | Default link | Used for |
|---|---|---|
TreeNormal |
Comment |
All tree text |