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:
parent
89f5af8104
commit
1430e9c700
1 changed files with 7 additions and 0 deletions
|
@ -9,8 +9,15 @@
|
|||
;;; Packages
|
||||
|
||||
(use-package! rustic
|
||||
:mode ("\\.rs\\'" . rust-mode)
|
||||
:mode ("\\.rs\\'" . rustic-mode)
|
||||
: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
|
||||
;; our respective modules standardize how they're initialized.
|
||||
(setq rustic-lsp-client nil)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue