MeanderingProgrammer / markdown.nvim

Plugin to improve viewing Markdown files in Neovim
MIT License
503 stars 20 forks source link

Make icon bigger on some terminal by default. #9

Closed lkhphuc closed 3 months ago

lkhphuc commented 3 months ago

On some terminal, unicode icons will span 2 cells if the icon is followed by a white space. This make the icons looks bigger and is comparable to text.

This PR changes the default icons with an explicit space in between. It does not make the rendered text any longer, just make the icons look bigger on supported terminal. Before/After:

Screenshot 2024-03-24 at 15 58 35 Screenshot 2024-03-24 at 15 58 22
MeanderingProgrammer commented 3 months ago

What font / terminal are you using? I played around with various Mono & Non Mono spaced Nerd Fonts and can't replicate this behavior. For me the icons are always either the small version (mono spaced fonts) or the larger version (non mono spaced fonts), but the space itself doesn't seem to make a difference.

lkhphuc commented 3 months ago

I'm using just the Symbols Nerd Font for the fallback of all my other Mono font on Wezterm. The relevant setting by default is here: https://wezfurlong.org/wezterm/config/lua/config/allow_square_glyphs_to_overflow_width.html?h=font but I remember other terminals have it too, but I might be wrong. FWIW other projects set symbols with a space as well https://github.com/LazyVim/LazyVim/blob/9e07a6615a16fafca37a6def86aa8344c09d289a/lua/lazyvim/config/init.lua#L35-L40

MeanderingProgrammer commented 3 months ago

Ahh interesting. I was able to replicate it through Wezterm, neat. I pushed in a change for the headings only in: https://github.com/MeanderingProgrammer/markdown.nvim/commit/8787fdf63ca4ea0f4a38a78774b3aca51c8e1856. I left the bullet point as is since that didn't seem to do anything. Thank you!

MeanderingProgrammer commented 3 months ago

Sorry, forgot to do the github magic to assign credit correctly.

This change is now in this commit: https://github.com/MeanderingProgrammer/markdown.nvim/commit/38f7cbcc0024737901ba87ee8bf1a6d466f99774