-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Update icons to use Nerd Fonts v3. #2604
Conversation
Please please merge this soon, I need this so badly :P |
Uffizzi Ephemeral Environment
|
Thanks for making this. This PR will break icons for anybody on nerd fonts v2 (like myself). We should add a way for the user to specify what version they're on in the config, and we should support both versions. Let's deprecate the 'showIcons' config value (such that if that's set to true, it'll assume you're using nerd fonts v2) and add a new key called Let me know if you need any pointers for that :) |
I'm not sure your particular reasons for not upgrading Nerd Fonts, however, in general, I would recommend all users upgrade. Probably the most important breaking change for the global community is that it fixes overwriting glyphs, which negatively impacts some of our users in Asia and other world regions. If what's holding back a user from upgrading is use of v2 code points in their personal configuration files (e.g., Neovim configuration), nerdfix provides tooling around the translation from Nerd Fonts v2 to v3. It can even be automated. If what's holding a user back from upgrading is they generated their own patched font using the v2 code points, I expect the user to also be able to patch the font with v3 just as easily, if not more so. Other projects are approaching this situation by having users either upgrade to v3 or pinning to the prior release of the tool/plugin/library prior to updating backwards incompatible code points. I'm not in agreement that it is worth the effort to create a (potentially breaking) change in the Lazygit config just to support both Nerd Fonts v2 and v3 in the same version of Lazygit, or any software, at this point. v3 is a net win for the global community. It's unclear there will ever be a v4 and so I don't think this is a useful as an extensible solution to a what-if scenario. At that point, there may be a new and better solution than Nerd Fonts. |
Even though I agree that updating NerdFont to v3 and updating software so support it is the "correct" way to do things, there's a caveat. User @Finii stated in a discussion somewhere (maybe Lunarvim's repo, I couldn't find it) about the instability of Material Icons codepoint changes (something like that). In resume, there's no way to guarantee that there'll be no more breaking changes like this in the future. I don't know if this information changes the way you're planning things, but I thought it was important to share. |
I would definitely be in agreement with @jesseduffield's requested approach of supporting multiple versions of Nerd Font simultaneously if I had high confidence that Nerd Fonts expected breaking changes to come more frequently than they have. As it stands, the last major version release was over five years ago. Without other substantial information, the trend looks like years-long cycles. Has @ryanoasis published plans for Nerd Font's roadmap and anticipated stability or instability? That would be informative. |
Well, the new codepoints have already been introcuded with Nerd Fonts Sorry for the breaking change, but that has been simmering for several years now, and we have to set this right at some point.
That is correct, they do not claim codepoint stability, but if you have a look at the past releases (after they adopted the
And then, if you look closely Octicons is marked as 'not stable'. But we also updated them.
Yes, I do not expect a |
That's correct. We accumulated several (breaking) changes over years for And as I said, upstream might ignore codepoint stability, but we care. Codepoint stability tool at work. |
@Finii Thank you, that was really informative! @jesseduffield With this additional information, do you still want to take an approach with a |
My rationale for letting the user specify the version is less about preparing for future changes (though I would not be surprised if at some point another breaking change in nerd fonts happened), and more about allowing existing lazygit users to upgrade their lazygit version without having to do anything else. Upgrading nerd fonts is enough of a hassle that I don't want to inflict it on users who upgrade without realising they're about to break their icons. As an example, here's the process I just followed to update my fonts:
That took around 10-15 minutes and it wasn't that painful, but it's enough of a task that I want to allow users to defer doing it until they feel like it, without blocking them from updating lazygit. To be clear here's what lazygit looks like when nerd fonts v2 is still being used (with this PR's code) So I still want this done in a backwards-compatible way |
At least can we make nerd font v3 users be able to use the new icons(really need that!!), like adding a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marking as 'changes requested' for my own bookkeeping :)
Hello @jesseduffield, do you have any update to share about this ? Users with a nerd font 3 really have a bad experience with the characters and it will be nice if something was made :) (btw, how do you have the "tree lines in your commits view" ? Cant' find the options) |
This is not waiting for Jesse, he was very clear about how he wants this done. (And for the record, I agree.) This is waiting for someone to make a PR that introduces the option.
This I totally agree with, I'm waiting for this too.
|
Ok, my bad, I misread the answer
Thank you ! |
06e5250
to
562f690
Compare
I don't have the time to add optionality. I'm closing this to make that explicit. Lazygit users who want Nerd Fonts v3 support are welcome to use the patch linked to by this PR. |
As an alternative to @bmichotte's PR I made one with a slightly different approach: #2731. |
This updates icons to use Nerd Fonts v3 which had breaking changes. I used all the recommendations from
nerdfix check
except for the Azure icon, which I changed tonf-md-microsoft_azure
.Fixes #2603.
Output from nerdfix
go run scripts/cheatsheet/main.go generate
)docs/Config.md
) have been updated if necessary