nvim-lua / lsp-status.nvim

Utility functions for getting diagnostic status and progress messages from LSP servers, for use in the Neovim statusline
MIT License
626 stars 41 forks source link

Can't render indicator_info and status_symbol with Nerd Font #23

Open vcoyette opened 3 years ago

vcoyette commented 3 years ago

Hi ! For some reason, indicator_info and status_symbol are not rendered correctly. I am using FiraCode Nerd Font, and I tried with Hack Nerd Font also. I know I can change the symbols, I just thought it may be worth mentionning. Is there a special font to install ?

2020-11-22-154721_3796x2314_scrot

wbthomason commented 3 years ago

Interesting, thanks for the report! What terminal emulator are you using? Typically, having a Nerd Font/Font Awesome and a terminal emulator that does font fallback appropriately should work (for instance, I use JetBrains Mono, but have Nerd Fonts installed that my terminal emulator - kitty - finds for the symbol codepoints).

vcoyette commented 3 years ago

I tried with alacritty and st, for which I have never had any issue with nerd fonts... This is weird ! Anyway, I don't have any idea how I could debug that, if you have I can post back any logs you think of.

wbthomason commented 3 years ago

Hmm. Yeah, I don't see a way to debug font fallback with alacritty, unfortunately. It looks like kitty uses either agave Nerd Font Mono or NotoEmoji Nerd Font Mono as fallbacks for me, when I open a file and display the default diagnostics symbols. I would think that any Nerd Font would have the same symbols, though...

Unfortunately, this might be worth asking about on the alacritty repo, since I have no idea how alacritty font fallback, etc. works.

wbthomason commented 3 years ago

Also, could you please post the substitute characters you found that do work for you? I'd like to add them to the docs as alternatives for other people with the same issue.

Finally, could you please try installing Font Awesome manually, just in case that makes fallback work as we'd hope?

vcoyette commented 3 years ago

Sorry for the late response, I am using nf-mdi-information (you can check here) for indicator_info, and for lsp_status, I still don't know since I don't know what the original symbol looks like...

I was thinking, do you have the name of the symbols you are using on the nerdfont cheetsheat ? I can use any symbol I tried from there, so I could try to copy-paste it in my terminal to see what happens

wbthomason commented 3 years ago

The default error symbol is 0xf05e, the default warning symbol is 0xf071, the default info symbol is apparently 0x0001f6c8 (this one seems to not show up as expected in the Nerd Font search...), and the default hint symbol is 0x2757.

vcoyette commented 3 years ago

The problem must be with nerd font then, this is the icon that can not render properly... I tried installing Font Awesome (Font Awesome 5 Free Regular), but I got similar results.

quolpr commented 3 years ago

I have exactly the same issue with JetBrains and NerdFont and Alacrity 😞️ Is there any way to use lsp-status without nerd font? Thanks!

wbthomason commented 3 years ago

@quolpr: I haven't been able to figure out why this issue is happening, but you should be able to change the statusline symbols as a workaround.

trevarj commented 3 years ago

Seeing other rendering issues like this: image I am not sure how to reproduce exactly, but it happens when I scroll around during rust analyzer loading (ex. after on save)

zeroqn commented 3 years ago

For status_symbol and indicator_hint, you can install google-noto-emoji.

wbthomason commented 3 years ago

@zeroqn Thanks, I added a note in the README.

chriztheanvill commented 2 years ago

Seeing other rendering issues like this: image I am not sure how to reproduce exactly, but it happens when I scroll around during rust analyzer loading (ex. after on save)

I have this issue.