Skip to content

fix(icons): replace obsolete Nerd Fonts icons #909

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

Merged
merged 4 commits into from
Jul 5, 2023

Conversation

loichyan
Copy link
Contributor

@loichyan loichyan commented May 2, 2023

Replaces obsolete icons which were removed in the Nerd Fonts v3.0.0 with same icons (some are not exactly the same, but very similar).

Note: This assumes you are using Nerd Fonts after v2.3.3, check out nerdfix for more details.

@kevinrobayna
Copy link

Came here to do this change 😅 thanks for doing this!

askoufis added a commit to askoufis/dotfiles that referenced this pull request May 7, 2023
- neo-tree still has one icon missing for unstaged changes. Hopefully
  fixed in nvim-neo-tree/neo-tree.nvim#909.
cleong14 added a commit to cleong14/neo-tree.nvim that referenced this pull request May 7, 2023
@cseickel
Copy link
Contributor

cseickel commented May 8, 2023

The problem with this is that it break icons for anyone not on 3.0, which includes me. I would not expect people to upgrade their nerd font that often, so for the vast majority of users this will be a breaking change. Does the current version of neo-tree have broken icons when you are using a 3.0 nerd font?

@loichyan
Copy link
Contributor Author

loichyan commented May 8, 2023

The problem with this is that it break icons for anyone not on 3.0, which includes me.

v2.3.3 includes both new and obsolete icons:

The v2.3.x release has both, the 'old' and the 'new' codepoints to enable you an easier transision. Please change already now your prompts and other uses to the new codepoints. Release v3.0.0 will finally drop the old codepoints (F500 - FD46).

Does the current version of neo-tree have broken icons when you are using a 3.0 nerd font?

Yes, the old icons were removed and fallback to a random character.

@wookayin
Copy link
Contributor

wookayin commented May 8, 2023

I also see the neotree icons are broken due to the v3.0 font.

Unfortunately some of widely used other plugins lspkind.nvim, nvim-web-devicons already have moved to nerd font v3.0 and already made breaking changes without the compatibility layer. I hate such breaking changes but that somehow happened. I think it'd make sense to switch to the new icon unicode characters sooner than later.

If you care not having breaking changes (which is bad!), then we could provide some compatibility option (e.g. some option/flag for using v3-compatible codepoints) so that users can switch easily between two if they haven't migrated yet.

@cseickel
Copy link
Contributor

cseickel commented May 9, 2023

Unfortunately some of widely used other plugins lspkind.nvim, nvim-web-devicons already have moved to nerd font v3.0 and already made breaking changes without the compatibility layer.

If you care not having breaking changes (which is bad!), then we could provide some compatibility option (e.g. some option/flag for using v3-compatible codepoints) so that users can switch easily between two if they haven't migrated yet.

Ugh, what a mess! Luckily every icon is configurable. I think the right thing to do here is to not change the defaults, but have a config prominently displayed in the README that will set all of the affected icons to their 3.o equivalent for users that have already switched.

The next thing we need to do is to move to a new major release (v3.0) where we will make these changes part of the defaults.

Can someone make a new PR that includes a section in the README that has instructions on how to configure all affected icons to the v3 equivalents? I will then just hold this PR for the Neotree 3.0 release which I will have to hurry up on.

@cseickel
Copy link
Contributor

cseickel commented May 9, 2023

The instructions for manually fixing this were merged in #921

cleong14 added a commit to cleong14/neo-tree.nvim that referenced this pull request Jun 27, 2023
@Alan-Kuan
Copy link

Hi @loichyan,

For the symbol in the display name of "Buffers", I noticed that you chose 󰈙 to replace . However, I found 󰈚 a better one, which looks the same as the old one.

I think you can make another commit to update it.

@cseickel cseickel merged commit ee0c058 into nvim-neo-tree:main Jul 5, 2023
cleong14 added a commit to cleong14/neo-tree.nvim that referenced this pull request Jul 17, 2023
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.

5 participants