diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-16 01:13:12 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-16 01:13:12 -0500 |
| commit | 79ba783124319fa913758091120158fdc0eaa476 (patch) | |
| tree | cc3ef2f4d4143817da4bf90aa3757f8c23c8bb2c /modules | |
| parent | 49877b4442aa33fde037903a177156a84b44fd4f (diff) | |
| download | dotemacs-79ba783124319fa913758091120158fdc0eaa476.tar.gz dotemacs-79ba783124319fa913758091120158fdc0eaa476.zip | |
fix(dashboard): exclude dashboard-mode from global font-lock
The dashboard banner title and section headings render in the default face instead of their theme colors. The faces are defined correctly. Global font-lock fontifies the dashboard buffer and strips the `face' text properties dashboard sets by hand: it owns `face' and clears props it didn't apply. Items and the navigator survive because their color rides a dashboard-items-face overlay, which font-lock leaves alone.
Excluding dashboard-mode from global font-lock keeps the banner and heading faces. I set it at top level so it applies regardless of the use-package body.
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/dashboard-config.el | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/dashboard-config.el b/modules/dashboard-config.el index 43e2182ee..3f3b1996e 100644 --- a/modules/dashboard-config.el +++ b/modules/dashboard-config.el @@ -161,6 +161,15 @@ system-defaults) are preserved rather than overwritten." (require 'recentf) (add-to-list 'recentf-exclude "/emms/history")) +;; Keep global font-lock out of the dashboard buffer. Dashboard colors its +;; banner title (`dashboard-banner-logo-title') and section headings +;; (`dashboard-heading') with the `face' text property; `global-font-lock-mode' +;; owns `face' and strips manually-applied ones it didn't set, so with font-lock +;; running the banner and headings fall back to the default face. Excluding +;; dashboard-mode lets those text-property faces survive. (Item and navigator +;; colors ride a `dashboard-items-face' overlay, which font-lock leaves alone.) +(setq font-lock-global-modes '(not dashboard-mode)) + (use-package dashboard :demand t :hook (emacs-startup . cj/dashboard-only) |
