[emacs] Use rust-ts-mode, but rustfmt
This commit is contained in:
parent
12f22cab24
commit
278683bf88
1 changed files with 15 additions and 4 deletions
|
|
@ -1130,11 +1130,22 @@ Or, uh, Objective C, I guess."
|
|||
;; =================================================================
|
||||
(use-package rust-mode :ensure t
|
||||
:mode "\\.rs\\'"
|
||||
:commands rust-format-buffer ; 2023-10-26 Make this command available even when the mode isn't used.
|
||||
:config
|
||||
(setq rust-format-on-save t))
|
||||
|
||||
(use-package flycheck-rust :ensure t
|
||||
:hook (rust-mode . flycheck-rust-setup))
|
||||
;; 2023-10-18 We're using eglot now, I presume we don't want this.
|
||||
;; (use-package flycheck-rust :ensure t
|
||||
;; :hook (rust-mode . flycheck-rust-setup))
|
||||
|
||||
(defun my/rust-ts-mode-hook ()
|
||||
"Extra stuff for my rust mode."
|
||||
;; 2023-10-26 Use rust-format-buffer instead of eglot-format-buffer, I was
|
||||
;; having a hard time and it looked like eglot-format-buffer was screwing
|
||||
;; things up.
|
||||
(add-hook 'before-save-hook 'rust-format-buffer 0 t))
|
||||
|
||||
(add-hook 'rust-ts-mode-hook 'my/rust-ts-mode-hook)
|
||||
|
||||
;; =================================================================
|
||||
;; Clojure
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue