nvimdev / lspsaga.nvim

improve neovim lsp experience
MIT License
3.43k stars 285 forks source link

Unicode characters beyond the private use area should not be used as icons #458

Closed page-down closed 2 years ago

page-down commented 2 years ago

Description

When specifying icons (e.g. Nerd Fonts) to be displayed on the terminal, avoid using Unicode characters that are outside of private use area.

https://github.com/glepnir/lspsaga.nvim/blob/f20637e800c6f03f8f82e0ad5c3c167761e4b1eb/lua/lspsaga/lspkind.lua#L27

  [11] = { 'Interface', '練', colors.orange },

Expected Behavior Unicode should be displayed normally: "練". (U+FA57) There should be no requirement to force the terminal to override the font for this character.

U+FA57 is located in CJK Compatibility Ideographs, beyond the private usage area E000-F8FF.

Actual Behavior Users can only choose to use Nerd Fonts and lose this character. Otherwise the Interface icon cannot be displayed.

Neovim Built in Behavior n/a

Details

I saw your following issue, but didn't have a chance to reply.

https://github.com/kovidgoyal/kitty/issues/5415

In fact, this issue has been known to the Nerd Fonts project, with too many people giving feedback on similar issues, and has been listed as a top priority in the Nerd Fonts 3.0 roadmap. It is expected to introduce and use the new PUA and remove all unsuitable Unicode characters.

https://github.com/ryanoasis/nerd-fonts/discussions/716

Remap non-PUA glyphs

Remap all non-PUA glyphs so that they do not conflict with official unicode ...

I also recently gave the same advice to the neovim Neotest project, they are still choosing a new icon, see the link below for details.

https://github.com/nvim-neotest/neotest/issues/79#issuecomment-1198908492

Advice on avoiding characters outside the PUA is listed in kitty terminal FAQ.

... with the symbol_map directive: symbol_map ... U+F500-U+F8FF Symbols Nerd Font

Those Unicode symbols beyond the E000-F8FF Unicode private use area are not included.

@glepnir

BTW: I can understand why you are angry, no one wants their feedback to be ignored. Since I know more about the feedback on that project, the author has responded to countless of the same questions and patiently given facts and explanations. I suggest calming down and getting back to the technical issues while avoiding attacks.

glepnir commented 2 years ago

In his view, any mistakes come from other people. He didn't even want to do a little bit of what other terminals did. you can add U+FA57 to your symbol map in kitty. but I will change to anoher symbol does e7b7 can work for you?

page-down commented 2 years ago

All I can say is that everyone in the world has his or her own personality and way of doing things. And I choose to remain civil and not attack others. Even if someone can't agree with me, I respect their choice and standing point. I respect someone's contribution to open source software and take the time to respond to even one message.

He didn't even want to do a little bit of what other terminals did.

All I can say is that fixing old problems (maybe changing user's old habits) is a hard thing to do, even if it is in fact the right thing to do. And the terminal world has too much historical baggage, as someone who has been around long enough will be able to know.

Only products that are well accepted by many users will hold the future market. Incorrect and difficult to use products (software) will be phased out in time. Which one will stand last? Let time tell us.

I will change to anoher symbol does e7b7 can work for you?

Using the openshift icon here looks a bit strange. How about f493?

glepnir commented 2 years ago

had changed.

If only one terminal supports such behavior. Maybe I'll think about it and maybe I'm wrong. But my test results tell me that all common terminals work well. Except kitty. So what is right and what is wrong. It's not hard to fix the symbol display. It's just that I don't have much time to read his code. I don't think he has a good temper. Check the history of the issue and you will find that he is not so friendly. Arguing with people is his habit.