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

Color Palette prefix used in demo screenshots #3

Closed
AnweshGangula opened this issue Jun 23, 2024 · 9 comments
Closed

Color Palette prefix used in demo screenshots #3

AnweshGangula opened this issue Jun 23, 2024 · 9 comments
Labels
notabug The is not a bug question Further information is requested

Comments

@AnweshGangula
Copy link

Hi,

can you please provide the code for the color palette icon used for prefix in the demo screenshot?

demo screenshot

@DevelopmentCool2449
Copy link
Owner

Sure

(setq colorful-prefix-string (concat (nerd-icons-faicon "nf-fae-palette_color") " "))

@DevelopmentCool2449 DevelopmentCool2449 added the question Further information is requested label Jun 23, 2024
@AnweshGangula
Copy link
Author

AnweshGangula commented Jun 23, 2024

I'm getting the following error. Do I need to do anything in my config?

Symbol's function definition is void: nerd-icons-faicon

@DevelopmentCool2449
Copy link
Owner

You need to install nerd-icons.el package and/or use a patched nerd font

Also you can use this:

(setq colorful-prefix-string "")

@AnweshGangula
Copy link
Author

AnweshGangula commented Jun 23, 2024

Please note that I'm using a Windows PC. I installed both nerd-icons and one of the patched nerd fonts you mentioned, but still get the same error.

I also am not able to see the icons you added in the above response - (setq colorful-prefix-string " ")

@DevelopmentCool2449
Copy link
Owner

DevelopmentCool2449 commented Jun 23, 2024

I can't help so much since this feels more an issue with nerd-icons.el
but this can help,
try install Symbols Nerd Fonts Mono font and ensure your emacs is using a patched nerd font (not Symbols Nerd Fonts Mono).

and then use this in your config:

(setq colorful-prefix-string "")
;; or tihs
(setq colorful-prefix-string (concat (nerd-icons-faicon "nf-fae-palette_color") " "))

Also as an aditional note: the screenshot was done in Windows and currently it works fine.

@AnweshGangula
Copy link
Author

AnweshGangula commented Jun 24, 2024

I was trying to figure out the issue but couldn't.

Can you help me with what you mean by patched nerd font? And how can is use that? - because I tried using (nerd-icons-font-family "Source Code Pro"), but all the icons went away

I can see that when I execute this command (C-c C-c) with insert I get the icon properly, but when I execute with concat the result is not rendered properly

Is this expected or does this mean I have some issue?

using result

(insert (nerd-icons-faicon "nf-fae-palette_color") " ")

result command output

using concat

(concat (nerd-icons-faicon "nf-fae-palette_color") " ")

concat result

@AnweshGangula
Copy link
Author

AnweshGangula commented Jun 24, 2024

I tried switching the font-family to a couple of other families to see if this works, but I still get the error Symbol's function definition is void: nerd-icons-faicon.

I also asked for what the issue could be in this superuser post and found that the icon might be specific to a font. So maybe this particular icon needs a specific font family?

Ignoring the font, the first issue to fix in my case is the Symbol's function definition is void: nerd-icons-faicon - which i'm not sure what I'm doing wrong

@DevelopmentCool2449 DevelopmentCool2449 added the notabug The is not a bug label Jun 24, 2024
@DevelopmentCool2449
Copy link
Owner

DevelopmentCool2449 commented Jun 24, 2024

I was trying to figure out the issue but couldn't.

Can you help me with what you mean by patched nerd font? And how can is use that? - because I tried using (nerd-icons-font-family "Source Code Pro"), but all the icons went away

nerd-icons-font-family must be set to a downloaded font from nerd font webpage.
it's optional setting it since it defaults to "Symbols Nerd Font Mono" which should already be installed.

I can see that when I execute this command (C-c C-c) with insert I get the icon properly, but when I execute with concat the result is not rendered properly

Is this expected or does this mean I have some issue?

it's an issue, you should probably use this in your early-init.el (prefer-coding-system 'utf-8)

and found that the icon might be specific to a font. So maybe this particular icon needs a specific font family?

It's not necessarily, nerd font already provides all the icons for this.

Ignoring the font, the first issue to fix in my case is the Symbol's function definition is void: nerd-icons-faicon - which i'm not sure what I'm doing wrong
I tried switching the font-family to a couple of other families to see if this works, but I still get the error Symbol's function definition is void: nerd-icons-faicon.

You probably must use (require 'nerd-icons) in your config (or add the :demand t keyword if you use use-package)

if the problem persists then open an issue on nerd-icons.el repository since it is the best place to ask, you will have better answers there.

@AnweshGangula
Copy link
Author

tried the early-init & :demant t approach you mentioned, still doesn't fix the issue. I raised an issue in the nerd-icons repo.
And Thank you for your help @DevelopmentCool2449. Really appreciate you taking the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notabug The is not a bug question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants