nvim-lua / lsp-status.nvim

Utility functions for getting diagnostic status and progress messages from LSP servers, for use in the Neovim statusline

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't render indicator_info and status_symbol with Nerd Font

vcoyette opened this issue · comments

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

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).

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.

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.

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?

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

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.

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.

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

@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.

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)

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

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

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.