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.
This commit is contained in:
Marien Zwart 2024-05-09 21:24:13 +10:00
parent e0db277665
commit 310cadf813
No known key found for this signature in database

View file

@ -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)