mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-09 12:57:25 -05:00
fix(rust): ensure order of modes in auto-mode-alist
Depending on install order, the rust-mode might get precedence, causing rustic to not be loaded on *.rs files.
This commit is contained in:
@ -9,8 +9,15 @@
|
|||||||
;;; Packages
|
;;; Packages
|
||||||
|
|
||||||
(use-package! rustic
|
(use-package! rustic
|
||||||
|
:mode ("\\.rs\\'" . rust-mode)
|
||||||
:mode ("\\.rs\\'" . rustic-mode)
|
:mode ("\\.rs\\'" . rustic-mode)
|
||||||
:preface
|
:preface
|
||||||
|
;; HACK: `rust-mode' and `rustic' add entries to `auto-mode-alist', but
|
||||||
|
;; package load order makes which gets precedence unpredictable. By removing
|
||||||
|
;; them early, we rely on the `:mode' directives above to re-insert them
|
||||||
|
;; with the correct order.
|
||||||
|
(setq auto-mode-alist (assoc-delete-all "\\.rs\\'" auto-mode-alist))
|
||||||
|
|
||||||
;; HACK `rustic' sets up some things too early. I'd rather disable it and let
|
;; HACK `rustic' sets up some things too early. I'd rather disable it and let
|
||||||
;; our respective modules standardize how they're initialized.
|
;; our respective modules standardize how they're initialized.
|
||||||
(setq rustic-lsp-client nil)
|
(setq rustic-lsp-client nil)
|
||||||
|
Reference in New Issue
Block a user