update eglot-rust-dir-locals.el
parent
29494b002d
commit
e166c4beae
@ -1,16 +1,19 @@
|
|||||||
((rust-ts-mode . ((eval . (progn
|
((rust-ts-mode . ((eval . (progn
|
||||||
(require 'rust-mode)
|
(require 'rust-mode)
|
||||||
|
(require 'eglot)
|
||||||
|
(advice-add 'eglot-inlay-hints-mode :around 'ignore)
|
||||||
(eglot-ensure)
|
(eglot-ensure)
|
||||||
|
(company-mode 1)
|
||||||
(use-local-map (make-composed-keymap (list rust-mode-map rust-ts-mode-map)))
|
(use-local-map (make-composed-keymap (list rust-mode-map rust-ts-mode-map)))
|
||||||
(add-hook 'before-save-hook rust-before-save-hook nil t)
|
(add-hook 'before-save-hook rust-before-save-hook nil t)
|
||||||
(add-hook 'after-save-hook rust-after-save-hook nil t)
|
(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 ()
|
(keymap-set (current-local-map)
|
||||||
|
"C-c C-c C-d"
|
||||||
|
(lambda ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(rust--compile
|
(rust--compile
|
||||||
"%s doc"
|
"env TMPDIR=${HOME}/tmp cargo test && cargo doc")))))
|
||||||
rust-cargo-bin)))))
|
(eglot-workspace-configuration . (:rust-analyzer (:check
|
||||||
(eglot-workspace-configuration . ((:rust-analyzer . (:checkOnSave
|
(:command "clippy"))))
|
||||||
(:command "clippy")))))
|
|
||||||
(rust-format-on-save . t)
|
(rust-format-on-save . t)
|
||||||
(rust-rustfmt-switches . ("--edition" "2021"))))
|
(rust-rustfmt-switches . ("--edition" "2021")))))
|
||||||
(nil . ((rust-cargo-bin . "env TMPDIR=~/tmp cargo"))))
|
|
||||||
|
Loading…
Reference in New Issue