Closed
Description
When using devicons where nerd font is not "mono", the glyphs overhang the next character. Because of this an extra space of padding is added. When using nvim-tree in a floating window with winblend(transparency), the glyphs will overhang the character from the underlying window.
Describe the solution you'd like
add opts.renderer.icons.padding to the padding.get_arrows function
Additional context
using default opts.renderer.icons.padding

using U+00A0 (NO-BREAK SPACE) as opts.renderer.icons.padding

Activity
alex-courtis commentedon Apr 24, 2025
Thanks for the really useful "transparent diagnostics", the problem is really clear. I can see it in my terminal when I enable arrows.
Yes, let's fix this please. I'd be most grateful for a Pull Request - it looks like you have identified the change necessary.
We will need to define another option, so as not to interrupt
renderer.icons.padding
users who expect no arrow padding. Doesnvim-tree.renderer.icons.folder_arrow_padding
sound reasonable to you?This functionality is historically fragile, so we will need to test all permutations and combinations of
renderer
options used inpadding.lua
.alex-courtis commentedon Apr 24, 2025
Once this is all tested and ready to merge, we can refactor the option in a backwards compatible manner. This is messy, so we do it last so as to avoid noise in the PR.
smchunn commentedon Apr 25, 2025
I used your naming idea for the new config attribute. I have done minimal testing but will try to test everything tomorrow.
feat(#3113): add renderer.icons.folder_arrow_padding (#3114)