-
Notifications
You must be signed in to change notification settings - Fork 129
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
nil icon name when dashboard-set-heading-icons turned on #459
Comments
What's the value of your variable |
I've tested with both all-the-icons and nerd-icons, the error persists until I turned off heading icons and keeps only file icons. So I believe it has something to do with heading icon set. |
I experience the same thing. When I set One other strange thing is that when I do |
What's the value of variable It could be an issue regarding the order you load this package, it should be something similar to: (setq dashboard-set-heading-icons t)
(require 'dashboard) ; it will auto configure it for you or set them all manually: (require 'dashboard)
(setq dashboard-set-heading-icons t)
(setq dashboard-icon-type 'all-the-icons)
(setq dashboard-heading-icons '((recents . "history")
(bookmarks . "bookmark")
(agenda . "calendar")
(projects . "rocket")
(registers . "database"))) |
After checking |
Hello everyone - will also raise that I am experiencing the same issue. After reviewing this thread, I also tried to set the icons manually as well, but to no avail. Here is the exact config I am using, utilizing use-package for reference. Willing to try alternative approaches based on feedback: (use-package dashboard
:config
(dashboard-setup-startup-hook)
(setq dashboard-items '((recents . 5)
(bookmarks . 5)
(projects . 5)
(agenda . 5)
(registers . 5)))
(setq dashboard-set-heading-icons t)
(setq dashboard-icon-type 'all-the-icons)
(setq dashboard-heading-icons '((recents . "history")
(bookmarks . "bookmark")
(agenda . "calendar")
(projects . "rocket")
(registers . "database")))) |
Hi, @knaveightt! What kind of error did you get? It seems like you configure the package correctly. 🤔 |
Hi @jcs090218 ! Before setting the dashboard-heading-icons manually, I was also receiving the |
The insertion logic is here: emacs-dashboard/dashboard-widgets.el Line 582 in 34a0076
Do your environment support icons? Are you using a terminal? 🤔 |
Hi @knaveightt your config looks good, I checked the code and there are some evaluations at loading time (maybe we have to fix that). (use-package dashboard
:config
(dashboard-setup-startup-hook)
:init
(setq dashboard-items '((recents . 5)
(bookmarks . 5)
(projects . 5)
(agenda . 5)
(registers . 5)))
(setq dashboard-set-heading-icons t)
(setq dashboard-set-file-icons t)
(setq dashboard-icon-type 'all-the-icons)
(setq dashboard-heading-icons '((recents . "history")
(bookmarks . "bookmark")
(agenda . "calendar")
(projects . "rocket")
(registers . "database")))) Please, let me know if that works. Maybe you have to add |
Hi @jcs090218 and @ricardoricho, Almost got there, I think! For reference, I am on a Windows 10 machine that (should) support icons, I am able to manually place them using various all-the-icons functions. With the above suggestion of moving many of the setq commands to :init (and setting :demand for all-the-icons), I am now seeing the 'circle' icons for Agenda items. However I am still not seeing icons for the dashboard headers: |
Hi all, if you still have problems displaying icons for headers and files, etc., please have a look at my pull request #467. As long as it is not merged into the master, you can simply replace the file "dashboard-widgets.el" in the package folder "dashboard-20230512.1839" with the same file from the pull request. You also have to delete the corresponding *.elc file, e.g. "dashboard-widgets.elc", so that the changes have an impact. |
A cleaner solution, for now, would be:
If you change it in dashboard-widget.el and you run |
I was having this issue, and I was able to fix it by changing two lines in dashboard-widget.el
Whether or not this is a good idea, I don't know. But this is where it seemed to be getting the idea that something was nil, and nothing I did to my init.el seemed to work. This did. |
My workaround: (advice-add #'dashboard-replace-displayable :override #'identity) |
I've been having the same problem for a while. I think I've got a fix. The proposed fixes above didn't help me. Essentially, I've moved the customizations (i.e. (use-package dashboard
:config
(dashboard-setup-startup-hook)
:custom
(dashboard-startup-banner 'logo)
(dashboard-banner-logo-title nil)
(dashboard-center-content t)
(dashboard-icon-type 'nerd-icons)
(dashboard-set-heading-icons t)
(dashboard-set-file-icons t)
(dashboard-set-footer nil)
(dashboard-projects-backend 'project-el)
(dashboard-display-icons-p t)
(dashboard-items '(
(recents . 5)
(agenda . 5)
(projects . 5)
(bookmarks . 5)
)))
Forgive me for getting any of the terms incorrect, I'm an emacs newbie. |
I think it has been fixed in 3fce60c. |
It was still broken for me in the last week, until I moved the config into |
Hi All - I entered this thread back around May, and just recently tried @LukeDRussell's suggestion (as well as recently moving from all-the-icons to nerd-icons for my setup). It seems to work now for me! |
FYI, I'm using dash.el 2.20.0 through (use-package dashboard
:straight t
:init
(setq dashboard-display-icons-p t
dashboard-icon-type 'nerd-icons
dashboard-set-file-icons t
dashboard-set-footer nil
dashboard-set-headings-icons t)
:config
(dashboard-setup-startup-hook)) |
Moving the icon statements to the My dashboard.el config (use-package dashboard
:ensure t
:config
(dashboard-setup-startup-hook)
:diminish
(dashboard-mode page-break-lines-mode)
:custom
(dashboard-center-content t)
(dashboard-startup-banner 4)
(dashboard-items '((recents . 10)))
(dashboard-icon-type 'nerd-icons)
(dashboard-set-heading-icons t)
(dashboard-set-file-icons t)
:custom-face
(dashboard-heading ((t (:foreground "#f1fa8c" :weight bold))))
:hook
(after-init . dashboard-setup-startup-hook))
(setq initial-buffer-choice (lambda () (get-buffer-create "*dashboard*")))
(setq dashboard-banner-logo-title "Aah, you're back. Drink your coffee while it's warm . . .")
(setq dashboard-startup-banner "~/.emacs.d/coffee-isometric-dashboard.png") |
I'd tried a bunch of 'fixes' for this over the months to no avail, @christophermadsen's suggestion to shift everything into |
Really happy it's also fixed for you! But it was @LukeDRussell who came up with the solution :) |
When
dashboard-set-heading-icons
turned on, I'm getting error:unable to find icon with name nil in icon set
with both nerd-icons and all-the-icons. Not sure if it's because additional headings in dashboard-widgets like ls-directory.The text was updated successfully, but these errors were encountered: