nvim-tree / nvim-tree.lua

A file explorer tree for neovim written in lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[question/feature request] ability to expand a directory node

emmanueltouzery opened this issue · comments

Hi, I think I must just be missing an existing feature, because looking at the screenshots it would seem the feature is already available, but I can't find it... I would like the ability, when the cursor is on top of a folder, to expand or collapse the folder node.
Currently I know how to ENTER in the folder (reset the whole tree to have that folder as a new root), but I'd sometimes like to just expand this folder node, without going inside it.

In the screenshots on the github page, I can see multiple folders expanded so I guess it has to be possible already today? I really tried to find the feature (shortcut or function), but I really couldn't!

And thank you for a great plugin!

Did you reconfigure any mappings? This is exactly what <CR> does by default. <C-]> is default mapping for changing root. Are you maybe using some ready configuration?

YES!
I'm using doom-nvim, and you're 100% right, they've customized it:
https://github.com/NTBBloodbath/doom-nvim/blob/main/lua/doom/modules/config/doom-tree.lua#L150

Thanks a lot, sorry that I opened this bug, I'll be more careful with that in the future...