-
-
Notifications
You must be signed in to change notification settings - Fork 629
feat: Option for grouping empty directories #247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Grouping is controlled by the setting `vim.g.nvim_tree_group_empty`.
thanks a lot ! The overall algorithm is perfect and the feature works perfectly. |
Using lua to configure this, is setting this option to vim.g.nvim_tree_group_empty = true does not work, while vim.g.nvim_tree_group_empty = 1 does. Some other options I have set to true do work as expected. |
that's strange, if you find issues refering to the documentation please leave an issue. |
Is there a callback function to toggle this feature? |
it does work for me though, just assign it to 1 ( |
@cloggier I implemented the option the same way all the other boolean options are currently implemented. The reason why only some options work when you set them to the lua value
But when using vim variables in lua, you should treat them like vim variables. That means you should use 1 for true and 0 for false until proper lua configuration is implemented. @Lux3mb0urg no, I did not implement a toggle function. |
@sindrets tusen takk for detailed response and amazing PR! |
indeed until i don't make the setup refactoring, this option thing will keep being clunky. |
Fixes #191.
This adds an option
g:nvim_tree_group_empty
(disabled by default) that compacts dirs that only contain 1 dir / symlink dir, into one node in the file tree.