-
-
Notifications
You must be signed in to change notification settings - Fork 619
feat(#3113): add renderer.icons.folder_arrow_padding #3114
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
You legend @smchunn I'll get to a review and test over the weekend. |
Looks like you'll need to update help: https://github.com/nvim-tree/nvim-tree.lua/blob/master/CONTRIBUTING.md#documentation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working nicely.
Full test matrix for config items that affect padding:
renderer.indent_width
renderer.icons.padding
renderer.icons.folder_arrow_padding
renderer.icons.show.folder_arrow
renderer.indent_markers.enable
renderer.indent_markers.inline_arrows
renderer.indent_markers.icons ...
That's not practical. Testing just those that affect get_arrows
.
Directory and not directory.
Uncomment each test as you go
renderer.icons.glyphs.folder.arrow_closed = ">"
renderer.icons.glyphs.folder.arrow_open = "|"
renderer.icons.glyphs.folder.default = "c"
renderer.icons.glyphs.folder.open = "o"
-- renderer.icons.show.folder_arrow = false
-- renderer.icons.show.folder_arrow = true
-- renderer.indent_markers.enable = false
-- renderer.icons.folder_arrow_padding = "-"
-- renderer.icons.show.folder_arrow = true
-- renderer.indent_markers.enable = false
-- renderer.icons.folder_arrow_padding = ""
-- renderer.icons.show.folder_arrow = true
-- renderer.indent_markers.enable = true
-- renderer.icons.folder_arrow_padding = "-"
-- renderer.icons.show.folder_arrow = true
-- renderer.indent_markers.enable = false
-- renderer.icons.folder_arrow_padding = "----"
-- renderer.icons.show.folder_arrow = true
-- renderer.indent_markers.enable = true
-- renderer.icons.folder_arrow_padding = "----"
-- renderer.icons.glyphs.folder.arrow_closed = ""
-- renderer.icons.show.folder_arrow = true
-- renderer.indent_markers.enable = true
-- renderer.icons.folder_arrow_padding = "-"
-- renderer.icons.glyphs.folder.arrow_open = ""
-- renderer.icons.show.folder_arrow = true
-- renderer.indent_markers.enable = true
-- renderer.icons.folder_arrow_padding = "-"
This is looking really good. Let's refactor the options now: renderer = {
icons = {
padding = {
icon = " ",
folder_arrow = " ",
},
}, We do this via
|
renderer.icons.padding -> renderer.icons.padding.icon renderer.icons.folder_arrow_padding -> renderer.icons.padding.folder_arrow
Apologies, I steered you down a very incorrect path with the legacy conversion. Using the util is not possible as the source and destination are the same. In the interests of speed I've pushed up a fix to your branch, please tell me if you don't prefer that. Test cases passed: empty config renderer.icons.padding = nil renderer.icons.padding = {} renderer.icons.padding = "i"
renderer.icons.padding.icon = "i"
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Please re-test following my changes
Just nitpicking: I am not huge fan of |
Thank you! Yes please, I didn't see the forest for the trees. |
@alex-courtis Is this a mistake? All other test cases yielded the same results. I am good to go with your changes. Realized I forgot to update the actual padding logic when refactoring. Oops. Thanks for taking care of that one. Also not a fan of the name, but I do think |
Apologies, yes that is. It should be folder_arrow = 99
Do not stress; it is fragile, undocumented and annoying to test.
I see. It is |
Many thanks for your work @smchunn ! Merging... You've brought up a good point @gegoune - there are still some badly named options. We've dealt with several like You've got messy ones like Is it time for a review and overhaul of options? |
@alex-courtis Can use #2821 to track it. |
resolves #3113
default: opts.renderer.icons.folder_arrow_padding = " "