diff --git a/modules/lang/rust/config.el b/modules/lang/rust/config.el index 097649733..5d07f11a8 100644 --- a/modules/lang/rust/config.el +++ b/modules/lang/rust/config.el @@ -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)