lang/rust: prevent rustic from installing packages
This commit is contained in:
parent
d5ecfd3429
commit
7f2c7e7ae3
1 changed files with 12 additions and 6 deletions
|
@ -54,12 +54,18 @@
|
||||||
|
|
||||||
(add-hook 'rustic-mode-hook #'rainbow-delimiters-mode)
|
(add-hook 'rustic-mode-hook #'rainbow-delimiters-mode)
|
||||||
|
|
||||||
;; `rustic-setup-rls' uses `package-installed-p' unnecessarily, which breaks
|
(defadvice! +rust--dont-install-packages-p (orig-fn &rest args)
|
||||||
;; because Doom lazy loads package.el.
|
:override #'rustic-setup-rls
|
||||||
(defadvice! +rust--disable-package-call-a (orig-fn &rest args)
|
(cl-letf (;; `rustic-setup-rls' uses `package-installed-p' unnecessarily, to
|
||||||
:around #'rustic-setup-rls
|
;; try to detect rls. This breaks because Doom lazy loads
|
||||||
(cl-letf (((symbol-function 'package-installed-p)
|
;; package.el, and doesn't use package.el to begin with.
|
||||||
(symbol-function 'ignore)))
|
((symbol-function #'package-installed-p)
|
||||||
|
(symbol-function #'ignore))
|
||||||
|
;; rustic really wants to manages its own dependencies. I wish it
|
||||||
|
;; wouldn't. Doom already does; we don't need its help.
|
||||||
|
((symbol-function #'rustic-install-rls-client-p)
|
||||||
|
(lambda (&rest _)
|
||||||
|
(message "No RLS server running."))))
|
||||||
(apply orig-fn args))))
|
(apply orig-fn args))))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue