neo-tree.nvim
neo-tree.nvim copied to clipboard
Feature Request: Auto Width or Full Name Under Cursor
Hi thanks for the awesome work! I just switched from nvim-tree. And I think nvim-tree has one feature I use but I did't find here is the auto width of the explore. I have projects that use really deep folder hierarchy. The files are easily out of the explorer region which makes it hard to navigate and read. I have read the docs and only see "fit_content" for container which I think itn't what I want here.
[...] The files are easily out of the explorer region which makes it hard to navigate and read. [...]
I also encountered this and found it annoying. Maybe showing a one-word height horizontal floating window for showing the full name could be a cool idea for implementing this.
Hi, just wanted to announce that we now have an auto width expand option added! (details: #580 and #629)
It has been ported to v2.x
branch and seems to be stable enough.
This feature is accessible via two ways.
- Adding the following option to the configuration. This makes neotree always expand to fit the longest line.
require("neo-tree").setup({
window = {
auto_expand_width = true, -- default: false
},
})
- Alternatively, there is a keybind
e
that toggles the above option. IMO the best way to go is to keepwindow.auto_expand_width = false
and toggle the feature whenever needed with this keybind.
I really wanted to add the floating window feature as well, but unfortunately I haven't got any knowledge on floating window management so I would really appreciate if someone could implement this feature as well :)
@pysan3 I'm using it :) Thanks for implementing this feature!
btw, you forgot to mention in 2.(while you're recommending it) that the toggle is named toggle_auto_expand_width
. (since I have use_default_mappings = false,
).

Closing this as solved.