mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-24 16:30:58 -05:00
fix(lsp): rebuild lsp-mode if lsp-use-plists is changed
...since the last time 'doom sync' was executed.
This commit is contained in:
@@ -13,23 +13,13 @@
|
||||
:recipe (:host github :repo "jdtsmith/eglot-booster")
|
||||
:pin "cab7803c4f0adc7fff9da6680f90110674bb7a22")))
|
||||
|
||||
;; HACK: Ensure lsp-mode is built with lsp-use-plists on, but also that
|
||||
;; `lsp-use-plists' isn't set *before* the package is rebuilt (which would
|
||||
;; break things).
|
||||
;; lsp-mode must be rebuilt if this variable is changed, so expose it here so
|
||||
;; users can change it from $DOOMDIR/packages.el.
|
||||
(defvar lsp-use-plists t)
|
||||
(add-hook 'straight-use-package-pre-build-functions
|
||||
(lambda (package)
|
||||
(when (equal package "lsp-mode")
|
||||
(let ((default-directory (doom-path doom-profile-dir doom-profile-init-dir-name))
|
||||
(gen-file "01-modules-lsp-use-plists.el"))
|
||||
(if (not lsp-use-plists)
|
||||
(when (file-exists-p gen-file)
|
||||
(delete-file gen-file))
|
||||
(setenv "LSP_USE_PLISTS" "1") ; ensure the setting propagates to child processes
|
||||
(add-to-list 'doom-profile-generators
|
||||
(list gen-file (fn! `((setenv "LSP_USE_PLISTS" "1"))))))))))
|
||||
|
||||
(package! lsp-mode :pin "c74a723870f86cf9d1b7aee5e6e2add10d9ce127")
|
||||
(package! lsp-mode
|
||||
:pin "c74a723870f86cf9d1b7aee5e6e2add10d9ce127"
|
||||
:env `(("LSP_USE_PLISTS" . ,(and lsp-use-plists "1"))))
|
||||
(package! lsp-ui :pin "030d36960338fd633a98b332bc3734c412c25ca6")
|
||||
(when (modulep! :completion ivy)
|
||||
(package! lsp-ivy :pin "2927cbc776477e23d4a1062568d55793eed33c51"))
|
||||
|
Reference in New Issue
Block a user