From c5a20aaf1b6412d46ef628468e81e26eaeee244d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 11 Mar 2024 00:37:17 -0400 Subject: [PATCH] fix(treemacs): treemacs-nerd-icons load order w/ +lsp lsp-treemacs changes the default Treemacs theme, so treemacs-nerd-icons needs to be loaded after it, if it's installed/enabled. Fix: #7519 Fix: doomemacs/themes#801 Ref: emacs-lsp/lsp-treemacs#89 --- modules/ui/treemacs/config.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/ui/treemacs/config.el b/modules/ui/treemacs/config.el index 9f3febb6a..211e1f3bc 100644 --- a/modules/ui/treemacs/config.el +++ b/modules/ui/treemacs/config.el @@ -44,7 +44,12 @@ This must be set before `treemacs' has loaded.") (use-package! treemacs-nerd-icons - :after treemacs + :defer t + ;; HACK: Because `lsp-treemacs' mutates Treemacs' default theme, and + ;; `treemacs-nerd-icons' reads from it to populate its nerd-icons theme, + ;; load order is important to ensure they don't step on each other's toes. + :init (with-eval-after-load (if (modulep! +lsp) 'lsp-treemacs 'treemacs) + (require 'treemacs-nerd-icons)) :config (treemacs-load-theme "nerd-icons"))