Enabling (treemacs-icons-dired-mode) produces following error:
treemacs-icons-dired--display: Symbol鈥檚 value as variable is void: treemacs-icons-hash
Icons were changed quite a bit recently. Try updating both treemacs and treemacs-dired-icons.
I was having this error recently too - did a new install and all is working fine. Thanks @Alexander-Miller!
Hi,
Many thanks for a great package. I updated treemacs from melpa just now (20190912.1455) and I got this error. This was stopping dired from working as I had treemacs-icons-dired installed. As a quick fix, I removed this package and dired is back up and running.
Cheers
I updated treemacs from melpa just now
Did you update treemacs-icons-dired as well?
Ah interesting! I did a "mark all upgrades" in package manager. I wonder if it somehow missed treemacs. I'll reinstall it for good measure. Thanks for the prompt response.
Most peculiar, the most recent treemacs-icons-dired I see in melpa is 20190719.815 [1]. Is this what you'd expect?
[1] https://melpa.org/#/treemacs-icons-dired
Looks about right. The addons are small and don't need to be updated very often.
Got this error today after a MELPA update.
Error (use-package): treemacs-icons-dired/:config: Symbol鈥檚 value as variable is void: treemacs-icons-hash
I havent tried any debugging but everything is up to date.
I uninstalled treemacs-icons-dired and there's no error now but I don't know the ramifications of doing that and don't have much time to look into it now.
but I don't know the ramifications of doing that
Nothing. You uninstalled it, so you don't get the icons. That's it.
Error (use-package): treemacs-icons-dired/:config:
Looks like the error came from whatever is in your :config block. What did your use-package declaration look like?
Maybe there was some MELPA screw around. Anyway, I removed it and reinstalled and no errors. Just FYI as requested:
` (use-package treemacs
:ensure t
:defer t
:init
(with-eval-after-load 'winum
(define-key winum-keymap (kbd "M-0") #'treemacs-select-window))
:config
(progn
(setq treemacs-collapse-dirs (if treemacs-python-executable 3 0)
treemacs-deferred-git-apply-delay 0.5
treemacs-display-in-side-window t
treemacs-eldoc-display t
treemacs-file-event-delay 5000
treemacs-file-follow-delay 0.2
treemacs-follow-after-init t
treemacs-git-command-pipe ""
treemacs-goto-tag-strategy 'refetch-index
treemacs-indentation 2
treemacs-indentation-string " "
treemacs-is-never-other-window nil
treemacs-max-git-entries 5000
treemacs-missing-project-action 'ask
treemacs-no-png-images nil
treemacs-no-delete-other-windows t
treemacs-project-follow-cleanup nil
treemacs-persist-file (expand-file-name ".cache/treemacs-persist" user-emacs-directory)
treemacs-position 'left
treemacs-recenter-distance 0.1
treemacs-recenter-after-file-follow nil
treemacs-recenter-after-tag-follow nil
treemacs-recenter-after-project-jump 'always
treemacs-recenter-after-project-expand 'on-distance
treemacs-show-cursor nil
treemacs-show-hidden-files t
treemacs-silent-filewatch nil
treemacs-silent-refresh nil
treemacs-sorting 'alphabetic-desc
treemacs-space-between-root-nodes t
treemacs-tag-follow-cleanup t
treemacs-tag-follow-delay 1.5
treemacs-width 35)
;; The default width and height of the icons is 22 pixels. If you are
;; using a Hi-DPI display, uncomment this to double the icon size.
;;(treemacs-resize-icons 44)
(treemacs-follow-mode t)
(treemacs-filewatch-mode t)
(treemacs-fringe-indicator-mode t)
(pcase (cons (not (null (executable-find "git")))
(not (null treemacs-python-executable)))
(`(t . t)
(treemacs-git-mode 'deferred))
(`(t . _)
(treemacs-git-mode 'simple))))
:bind
(:map global-map
("M-0" . treemacs-select-window)
("C-x t 1" . treemacs-delete-other-windows)
("C-x t t" . treemacs)
("C-x t B" . treemacs-bookmark)
("C-x t C-t" . treemacs-find-file)
("C-x t M-t" . treemacs-find-tag)))
;; (use-package treemacs-evil
;; :after treemacs evil
;; :ensure t)
(use-package treemacs-projectile
:after treemacs projectile
:ensure t)
(use-package treemacs-icons-dired
:after treemacs dired
:ensure t
:config (treemacs-icons-dired-mode))
(use-package treemacs-magit
:after treemacs magit
:ensure t)
`
Interesting, I also uninstalled and reinstalled and it worked fine.
While talking about icons... and people are here: I just came back to using Treemacs (excellent name btw) and I must say its excellent.. after I had read the docs ;) I am just wondering if I am missing some icon setting for its git mode. The git status of files seems only to be reflect in the colour of the file name. Is there something a bit clearer/"in your face" such as "changed/staged" icons on the files needing attention and/or a project level indicator that git needs checking?
Interesting, I also uninstalled and reinstalled and it worked fine.
:man_shrugging:
Sounds like this thing is working for everyone now.
The git status of files seems only to be reflect in the colour of the file name.
That's how it's supposed to work.
I don't think icons are the way to go here. I've seen NerdTree screenshots with a plugin that would prefix filenames with something like [x] if it was modified and IMO it looked quite ugly and not really better visible than the colors I have going already.
Do you have a low contrast theme? Treemacs defines plenty of faces, including one for every git status it shows, so you can try making those more visible, or more obvious with a different background.
There's also the current dir awareness, so you can drop into your project's magit-status from anywhere in the project inside treemacs.
Yup. agreed re excessive icons. Faces was the way to go. Thanks.
Most helpful comment
Icons were changed quite a bit recently. Try updating both treemacs and treemacs-dired-icons.