From 310cadf813b26bf9f96a1917bf6f57b6aef692a2 Mon Sep 17 00:00:00 2001 From: Marien Zwart Date: Thu, 9 May 2024 21:24:13 +1000 Subject: [PATCH] Fix flycheck in emacs-lisp buffers Doom hooks into flycheck's emacs-lisp checker to load itself. This does not involve its profile loader, so this bypasses our profile dir customization. Hook into this hook to add that customization back. --- init.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/init.el b/init.el index d962686..f52628b 100644 --- a/init.el +++ b/init.el @@ -71,5 +71,13 @@ requested makes `doom doctor' work." package))) "\n" t))) +;; Doom adds a minor mode that makes flycheck-mode's emacs subprocess initialize +;; Doom. Extend this to set our profile dir before it does so. +(setq-hook! +emacs-lisp--flycheck-non-package-mode + flycheck-emacs-lisp-check-form + (prin1-to-string `(progn + (setq doom-profile-data-dir ,doom-profile-data-dir) + ,(read flycheck-emacs-lisp-check-form)))) + ;; Load the user's init.el. (load "@user-init@" nil 'nomessage)