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

* core/core-spacemacs-buffer.el: Nerd icons for Spacemacs bufer on teminal #16880

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

sunlin7
Copy link
Contributor

@sunlin7 sunlin7 commented Mar 13, 2025

Make the nerd icons works on terminal.

Extend the dotspacemacs-startup-buffer-show-icons with a new flag all to support the icons for both graphic frame and terminal frame (the terminal should be already support a nerd font first).

Please help review the changes. Thanks

@bcc32
Copy link
Collaborator

bcc32 commented Mar 13, 2025

Maybe the setting should be display-graphic-p for GUI-only, and then anything else non-nil is interpreted as applying to both GUI and terminal? This would be consistent with how dotspacemacs-mode-line-unicode-symbols already works.

@sunlin7
Copy link
Contributor Author

sunlin7 commented Mar 13, 2025

@bcc32 Thanks for the comment. Keeping the t for graphic frame will be better for compatible reason.
Terminal with icons is complicated, especially for the ssh to remote server cases, the terminal maybe only support one font (like mintty/putty), then the Emacs displays icons on these terminal will met error (Need the user to confirm their terminal working nerd fonts or not).
So this PR keeps dotspacemacs-startup-buffer-show-icons with t to works on graphic frame only.

@sunlin7
Copy link
Contributor Author

sunlin7 commented Mar 13, 2025

And yes, this would be consistent with how dotspacemacs-mode-line-unicode-symbols already works.

@bcc32
Copy link
Collaborator

bcc32 commented Mar 13, 2025

And yes, this would be consistent with how dotspacemacs-mode-line-unicode-symbols already works.

Sorry, I just don't agree with your assessment about this. Spacemacs already accepts the possibility that the default setting for dotspacemacs-mode-line-unicode-symbols may not work correctly for all users:

https://github.com/syl20bnr/spacemacs/blob/develop/doc/DOCUMENTATION.org#minor-modes

Unicode symbols are displayed by default. Setting the variable
=dotspacemacs-mode-line-unicode-symbols= to =nil= in your =~/.spacemacs= will
display ASCII characters instead (may be useful in terminal if you cannot set an
appropriate font).

If the Spacemacs defaults already require users to install such fonts for their terminal or otherwise actively disable certain features, I think it's acceptable to do that here as well, and avoid having these two variables interpret their values differently.

(Then we can reuse the dotspacemacs|symbol-value macro for example, although as a separate point I think it should probably be renamed.)

@sunlin7
Copy link
Contributor Author

sunlin7 commented Mar 13, 2025

Got you point.
I'm researching the unicode layer and try to understand how it works. Maybe need some time. Thanks

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.

2 participants