rainstormstudio / nerd-icons.el

GNU General Public License v3.0
206 stars 22 forks source link

Missing icon preview when inserting via helm #6

Open mattfromeurope opened 1 year ago

mattfromeurope commented 1 year ago

I don't know if it's supposed to do so, but when I use the command nerd-icons-insert, I don't get a preview of the icon that's supposed to be inserted. It would be a big convenience if you'd add it!

This is a screenshot of how it looks to me now (the font is "Iosevka Term Nerd Font Mono", if you're curious).

helm-nerd-icons-insert

rainstormstudio commented 1 year ago

Thank you for trying this out!

I think this could be a bug as it's supposed to display icons like this image

Could you please provide more information? like

mattfromeurope commented 1 year ago
  • the platform you are using

Arch Linux on a Macbook Air 2017. All updated.

  • Emacs version

I'm using GNU Emacs 29.

  • Is this under GUI or terminal?

GUI. Didn't try terminal yet.

  • have you tried setting nerd-icons-font-family to "Iosevka Term Nerd Font Mono" if using GUI?

That was the first thing I tried. Didn't work.

  • if it's under GUI, does it display properly if you use the default nerd-icons-font-family and do M-x nerd-icons-install-fonts?

Doesn't change anything.

  • if you insert an icon to a buffer, say scratch, does the icon appear properly? or it's only nerd-icons-insert function that has this issue?

Once inserted, the icons look fine, so that's not the problem. It's only the preview that's missing.

I also tried turning helm-mode off, and it seems like helm is the one responsible. With helm-mode off, the previews appear. Guess I gotta go back to ivy then ;-)

EDIT: Just checked, and in ivy everything works fine. So yes, it seems like helm is the issue here.

rainstormstudio commented 1 year ago

Great information! I'll try to figure out why it does not support helm.

rainstormstudio commented 1 year ago

Hello I think c4a882420452de4296499de5a6ea720f9764cc16 improves it a little bit. image

The problem is that completing-read in helm somehow loses the faces of the candidates. The candidates will then be using the default font face instead of nerd-icons-font-family. If you do not use a Nerd Font for your default font face, the previews will be shown as blocks.