Closed ribru17 closed 4 months ago
Just wanted to follow up on this PR and ask if there's anything additional we can do to help get it merged in.
I've been looking forward to this fix but the PR seems to have lost some traction. Appreciate the hard work!
@shadmansaleh Do you need any extra work to be done on this?
Looks good to me.
However, it doesn't make the icons bigger for me. what terminal are you using? Is this specific to vim-devicons? I have nvim-devicons and am using kitty.
Though, I don't see much downside to adding a space to icons if it makes it better for some people.
Interesting... I use kitty as well and I have to say the effect is much more noticeable on wezterm. Especially with the Rust icon (but this is a separate issue, nvim-devicons uses a Rust icon that kitty renders very small for some reason). That being said, for me on kitty it looks like the icons are slightly larger with this change
EDIT: I think I was wrong, and kitty does indeed already do this. However on wezterm the effect is quite noticeable
So kitty already renders the icon in full size and on wezterm it requires an extra space is that what you're saying?
Basically yes; or rather, they both require an extra space behind the icon (unless you set a special setting in kitty), but Wezterm isn't smart enough to recognize that the icon should be full width if the empty space after the icon has a different foreground color (even though it is just an empty space). This PR moves the space so it is applied before the foreground color changes, allowing Wezterm and similar terminals to recognize that the icon should be full-width
Then it's ok to merge this change. Thanks for your contribution.
I think this space may be optional in config, because some users use mono font, like me, no extra space needed.
Extra space showed in red.
You can use extra space in padding to any component, by the way
its look too many space if setting with just only icon or icon in right position. for wezterm small rendered icon issue, i have found this issue.
small rendered font: https://github.com/wez/wezterm/issues/342 probably fix: https://wezfurlong.org/wezterm/config/lua/config/allow_square_glyphs_to_overflow_width.html
This PR adds a space after the filetype icon before the highlight is applied, meaning that the space after the icon will also get the same foreground highlight as the icon itself, allowing the icon to take its proper full width on most (all?) terminal emulators. Users of
After:
Before:
After:
![lualineafterrust](https://github.com/nvim-lualine/lualine.nvim/assets/55766287/ee7c7bbc-1900-46d5-8c01-27903342a491)
vim-devicons
or users who set the icon highlight tofalse
will have the same experience as before. Examples: Before: