dir-locals.el configured to use rust-mode features in rust-ts-mode
parent
a12a48a0a3
commit
8e08d49a94
@ -1,7 +1,16 @@
|
|||||||
((rust-mode . ((eval . (eglot-ensure))
|
((rust-ts-mode . ((eval . (progn
|
||||||
(eglot-workspace-configuration . ((:rust-analyzer . (:checkOnSave
|
(require 'rust-mode)
|
||||||
(:command "clippy")))))
|
(eglot-ensure)
|
||||||
(rust-format-on-save . t)
|
(use-local-map (make-composed-keymap (list rust-mode-map rust-ts-mode-map)))
|
||||||
(rust-format-goto-problem . t)
|
(add-hook 'before-save-hook rust-before-save-hook nil t)
|
||||||
(rust-rustfmt-switches . ("--edition" "2021"))))
|
(add-hook 'after-save-hook rust-after-save-hook nil t)
|
||||||
|
(keymap-set (current-local-map) "C-c C-c C-c C-d" (lambda ()
|
||||||
|
(interactive)
|
||||||
|
(rust--compile
|
||||||
|
"%s doc"
|
||||||
|
rust-cargo-bin)))))
|
||||||
|
(eglot-workspace-configuration . ((:rust-analyzer . (:checkOnSave
|
||||||
|
(:command "clippy")))))
|
||||||
|
(rust-format-on-save . t)
|
||||||
|
(rust-rustfmt-switches . ("--edition" "2021"))))
|
||||||
(nil . ((rust-cargo-bin . "TMPDIR=~/tmp cargo"))))
|
(nil . ((rust-cargo-bin . "TMPDIR=~/tmp cargo"))))
|
||||||
|
Loading…
Reference in New Issue