Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(icons)!: update icon codepoints #447

Merged
merged 5 commits into from
May 7, 2023

Conversation

Jint-lzxy
Copy link
Collaborator

Fixes #439. This PR will be marked as ready for review when nerd font v3.0.0 is released - now Material Design Icons still have some display problems.

Searched using /[\uf500-\ufd46].

@CharlesChiuGit

This comment was marked as resolved.

@Jint-lzxy
Copy link
Collaborator Author

This PR will be marked as ready for review when nerd font v3.0.0 is released.

@CharlesChiuGit It's a WIP in upstream repo.

@CharlesChiuGit

This comment was marked as resolved.

@CharlesChiuGit
Copy link
Collaborator

CharlesChiuGit commented Mar 27, 2023

Cool project. Maybe worth checking our font icons with this tool.
https://github.com/loichyan/nerdfix

@CharlesChiuGit
Copy link
Collaborator

it's finally here!

https://github.com/ryanoasis/nerd-fonts/releases/tag/v3.0.0

@Jint-lzxy
Copy link
Collaborator Author

Now working on this 👍

@Jint-lzxy Jint-lzxy marked this pull request as ready for review May 4, 2023 11:50
@Jint-lzxy
Copy link
Collaborator Author

Jint-lzxy commented May 4, 2023

@CharlesChiuGit @ayamir So here's the deal: Given that some of the default icons used by upstream repos will (probably) be replaced with nf-cod-* (codeicons), shall we also update icons.lua to keep consistency with theirs?

Ref:
nvim-tree/nvim-web-devicons#264
onsails/lspkind.nvim#64

@CharlesChiuGit
Copy link
Collaborator

CharlesChiuGit commented May 4, 2023

i'll look into that after i hot home

quick question: can cod icons displayed without installing codicons.ttf?

@Jint-lzxy
Copy link
Collaborator Author

quick question: can cod icons displayed without installing codicons.ttf?

Yes as they're part of the NF collection.

@ayamir
Copy link
Owner

ayamir commented May 4, 2023

@CharlesChiuGit @ayamir So here's the deal: Given that some of the default icons used by upstream repos will (probably) be replaced with nf-cod-* (codeicons), shall we also update icons.lua to keep consistency with theirs?

Ref: nvim-tree/nvim-web-devicons#264 onsails/lspkind.nvim#64

Agree on this

@Jint-lzxy
Copy link
Collaborator Author

c5da797 simply ran nerdfix without making any special adjustments:

find ./lua -type f -exec $TMPDIR/gh/unk1/bin/nerdfix fix --replace nf-mdi-,nf-md- {} \;

@Jint-lzxy Jint-lzxy marked this pull request as draft May 4, 2023 13:57
@CharlesChiuGit
Copy link
Collaborator

@CharlesChiuGit @ayamir So here's the deal: Given that some of the default icons used by upstream repos will (probably) be replaced with nf-cod-* (codeicons), shall we also update icons.lua to keep consistency with theirs?

Ref: nvim-tree/nvim-web-devicons#264 onsails/lspkind.nvim#64

Seems legit. agreed.

@Jint-lzxy
Copy link
Collaborator Author

Looks like upstream repos decided to use Material Design Icons. So this PR is good 👍 A new release (v3.0.0) will be published after merging to remind users to update their installed Nerd Fonts.

@Jint-lzxy Jint-lzxy marked this pull request as ready for review May 5, 2023 12:16
@Jint-lzxy
Copy link
Collaborator Author

[View draft release]

@AngelontheRoad
Copy link
Contributor

New icons is weird after I replace the old icons.lua with icons.lua here. The font I use is the new nerd font JetBrainsMono Nerd Font

quicker_7e2200e5-4d80-4a01-88b8-b5b77392daf9.png

@Jint-lzxy
Copy link
Collaborator Author

Jint-lzxy commented May 6, 2023

@AngelontheRoad init.lua#diff. You have "icons with incorrect size". Quoting the release note:

  • Starting from v3.0.0, please use the Mono variant (Nerd Font Mono or NFM) as your GUI font.

@Jint-lzxy Jint-lzxy requested review from CharlesChiuGit and ayamir and removed request for CharlesChiuGit May 6, 2023 13:35
@Jint-lzxy Jint-lzxy changed the title fix(icons): Update icon codepoints fix(icons)!: update icon codepoints May 6, 2023
@AngelontheRoad
Copy link
Contributor

@AngelontheRoad init.lua#diff. You have "icons with incorrect size". Quoting the release note:

  • Starting from v3.0.0, please use the Mono variant (Nerd Font Mono or NFM) as your GUI font.

I tried some NFM font, but it not works.

quicker_c3def063-cabd-420e-9724-9b6d6390ef3b.png

@Jint-lzxy
Copy link
Collaborator Author

I tried some NFM font, but it not works.

In fact it is working, those undefined icons you observe is b/c nvim-tree/nvim-web-devicons#264 hasn't yet been merged. btw some Nerd Fonts have rendering issues when they're used in terminal emulators, you can use the Prompo * variant or another GUI font.

@AngelontheRoad
Copy link
Contributor

I tried some NFM font, but it not works.

In fact it is working, those undefined icons you observe is b/c nvim-tree/nvim-web-devicons#264 hasn't yet been merged. btw some Nerd Fonts have rendering issues when they're used in terminal emulators, you can use the Prompo * variant or another GUI font.

Thanks for your reply! I'd like to use old nerd font until all preparations done.

Copy link
Owner

@ayamir ayamir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Jint-lzxy Jint-lzxy merged commit 56538b7 into ayamir:main May 7, 2023
1 check passed
@Jint-lzxy Jint-lzxy deleted the fix-icon-codepoints branch May 7, 2023 04:24
@CharlesChiuGit
Copy link
Collaborator

sorry that i couldn't review this, my pc is down right now due to a transformer accident.

@Jint-lzxy
Copy link
Collaborator Author

sorry that i couldn't review this, my pc is down right now due to a transformer accident.

@CharlesChiuGit Sorry I just noticed that (#713 (comment)). No worries! 've crossed my fingers for you 🍻

singlemancombat pushed a commit to singlemancombat/nvim-config that referenced this pull request May 8, 2023
boomker pushed a commit to boomker/uvcode-nvim that referenced this pull request May 10, 2023
bleedingfight pushed a commit to bleedingfight/nvimdots that referenced this pull request May 13, 2023
@yyb196
Copy link

yyb196 commented Sep 11, 2023

@Jint-lzxy how can I disable this material icon. in my using case, it just render like a mess.

mosh-client ---remote connect---> server(include mosh-server tmux nvim)

after update to recent version, some characters randomly left on screen as below picture shows. I need a way to disable this feature I think, help please.

image

@Jint-lzxy
Copy link
Collaborator Author

after update to recent version, some characters randomly left on screen as below picture shows

@yyb196 This should be a problem with your terminal - it probably failed to perform a full-screen redraw when Neovim requested it to do so. Can you reproduce this issue on another emulator?

@yyb196
Copy link

yyb196 commented Sep 13, 2023

@Jint-lzxy thanks for your reponse.

yes, I can reproduce it on iterm2, alacritty and kitty, and on iOS devices I can reproduce it on blink.

If I change to use ssh instead of mosh it works on all above terminal emulator.

I know its a bug of mosh protocol, but I need to develop on my macbook or my ipad using mosh connect to remote server, If I use ssh the connection randomly close if I move or switch app on my ios.
mobile-shell/mosh#1041

Maybe we could find all the icons which using new codepoint and add a swtich to replace it with old codepoint?

@Jint-lzxy
Copy link
Collaborator Author

Maybe we could find all the icons which using new codepoint and add a swtich to replace it with old codepoint?

@yyb196 Sorry I didn't quite get ur point. If I read this right, those "observations" do share the same root cause - ur shell (or protocol) doesn't support certain escape sequences, but ur terminfo database reports that they're actually supported - that's why u get random characters (that are part of such escape sequences which are left unprocessed). What leads u to think that this is caused by codepoint changes?

@CharlesChiuGit
Copy link
Collaborator

CharlesChiuGit commented Sep 13, 2023

agree with Jint, I dont think it's about the new codepoint.
if u think old codepoint should work, u can try releases before v3.0.0 and show us the results.
if it's about your terminal of choice, well, then u better switch another terminal. we can't help u with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update icon codepoints
5 participants