Alexander-Miller / treemacs

GNU General Public License v3.0
2.12k stars 155 forks source link

Change all treemacs faces #976

Closed heeh closed 2 years ago

heeh commented 2 years ago

Is there a simple way to change all faces of treemacs? I do not want to override emacs default face.

Alexander-Miller commented 2 years ago

Treemacs defines close to 30 faces. Many of them inherit their looks from the basic syntax highlighting colors, but not all of them. So if you want to change many faces of treemacs you'll have to go through each one you want changed using something like this:

(custom-set-faces
 '(treemacs-directory-face ((t (:background "green" :foreground "yellow"))))
 '(treemacs-root-face      ((t (:background "blue"  :foreground "red")))))

The describe-char command can tell you which face is active at your cursor (which you can make visible with treemacs-show-cursor).