MeanderingProgrammer / render-markdown.nvim

Plugin to improve viewing Markdown files in Neovim
MIT License
1.73k stars 38 forks source link

Use better default callout icons #37

Closed AThePeanut4 closed 5 months ago

AThePeanut4 commented 5 months ago

In my opinion, the current default callout icons look a bit out of place when compared to e.g. the default heading icons. The note icon looks a bit too big, and the gap between the icons and text is also bigger (a lot bigger for the Tip callout).

This changes all the callout icons to use the nf-md-*_outline icons (https://www.nerdfonts.com/cheat-sheet), which are already being used for the Important and Warning callouts. Because they are smaller icons, the gap between the icon and the text can be reduced to generally be the same as for the headings.

An alternative is to use the same icons GitHub uses - the nf-oct-* icons. These are larger icons, so the gap between the icon and text can't be made smaller without losing the gap entirely for all but the Tip callout. The very large gap for the Tip callout is the main reason I prefer the nf-md-*_outline icons instead.

This is all obviously personal preference, so I completely understand if you don't agree - feel free to close this if you'd like.

Before

Text Icon class
Note  Note nf-oct-info
Tip  Tip nf-oct-light_bulb
Important 󰅾 Important nf-md-comment_alert_outline
Warning  Warning nf-cod-warning
Caution 󰳦 Caution nf-md-alert_octagon_outline

before

After

Text Icon class
Note 󰋽 Note nf-md-information_outline
Tip 󰌶 Tip nf-md-lightbulb_outline
Important 󰅾 Important nf-md-comment_alert_outline
Warning 󰀪 Warning nf-md-alert_outline
Caution 󰳦 Caution nf-md-alert_octagon_outline

after

Alternative

Text Icon class
Note  Note nf-oct-info
Tip  Tip nf-oct-light_bulb
Important  Important nf-oct-report
Warning  Warning nf-oct-alert
Caution  Caution nf-oct-stop

alt

MeanderingProgrammer commented 5 months ago

I appreciate the input!

I was pretty loose with the icon selection and hadn't noticed the inconsistency between nf-oct-*, nf-md-*, and nf-cod-*. Standardizing everything in terms of nf-md-* makes a lot of sense to me.

Font rendering also plays a large role here, so different users will end up with different experiences. For instance mine look like:

Before After After + Extra Space
personal-before peronal-after personal-after-space

The caution icon renders relatively smaller with your font setup compared to my own, and I'm sure others will have different minor variations.

I think of these 3 I prefer the option you selected as well so will merge this in and update the documentation.

Thanks for the PR!