lang/rust: fix #2132

Prevents rust-mode from taking over *.rs files.
This commit is contained in:
Henrik Lissner 2019-12-02 16:34:11 -05:00
parent 24506f15bf
commit 9775939f9d
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -56,6 +56,12 @@
(use-package! racer
:unless (featurep! +lsp)
:hook (rustic-mode . racer-mode)
:init
;; Fix #2132: `racer' depends on `rust-mode', which tries to modify
;; `auto-mode-alist'. We make extra sure that doesn't stick, especially when a
;; buffer is reverted, as it is after rustfmt is done wiht it.
(after! rust-mode
(setq auto-mode-alist (delete '("\\.rs\\'" . rust-mode)) auto-mode-alist))
:config
(set-lookup-handlers! 'rustic-mode
:definition '(racer-find-definition :async t)