update eglot-rust-dir-locals.el
parent
65b9a8a6c7
commit
42fe62da24
@ -1,19 +1,10 @@
|
|||||||
((rust-ts-mode . ((eval . (progn
|
((rust-ts-mode . ((eval . (progn
|
||||||
(require 'rust-mode)
|
|
||||||
(require 'eglot)
|
(require 'eglot)
|
||||||
(advice-add 'eglot-inlay-hints-mode :around 'ignore)
|
(eglot-ensure)
|
||||||
(eglot-ensure)
|
(setq-local eglot-workspace-configuration '(:rust-analyzer (:checkb
|
||||||
(company-mode 1)
|
(:command "clippy"))))
|
||||||
(use-local-map (make-composed-keymap (list rust-mode-map rust-ts-mode-map)))
|
(when (require 'company nil t)
|
||||||
(add-hook 'before-save-hook rust-before-save-hook nil t)
|
(company-mode 1))
|
||||||
(add-hook 'after-save-hook rust-after-save-hook nil t)
|
(when (require 'rust-mode nil t)
|
||||||
(keymap-set (current-local-map)
|
(setq-local rust-format-on-save t
|
||||||
"C-c C-c C-d"
|
rust-rustfmt-switches '("--edition" "2021"))))))))
|
||||||
(lambda ()
|
|
||||||
(interactive)
|
|
||||||
(rust--compile
|
|
||||||
"env TMPDIR=${HOME}/tmp cargo test && cargo doc")))))
|
|
||||||
(eglot-workspace-configuration . (:rust-analyzer (:check
|
|
||||||
(:command "clippy"))))
|
|
||||||
(rust-format-on-save . t)
|
|
||||||
(rust-rustfmt-switches . ("--edition" "2021")))))
|
|
||||||
|
Loading…
Reference in New Issue