diff options
author | John Turner <jturner.usa@gmail.com> | 2023-06-24 21:39:40 -0400 |
---|---|---|
committer | John Turner <jturner.usa@gmail.com> | 2023-06-24 21:39:40 -0400 |
commit | e166c4beaeddbf362e500ac20bd03c37a69a0ac0 (patch) | |
tree | 56aec30657007aade2d308d361a7a2da5cf70503 /dir-locals | |
parent | 29494b002d3db43d2bb95a182748d395d0290200 (diff) | |
download | emacs.d-e166c4beaeddbf362e500ac20bd03c37a69a0ac0.tar.gz |
update eglot-rust-dir-locals.el
Diffstat (limited to 'dir-locals')
-rw-r--r-- | dir-locals/eglot-rust-dir-locals.el | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/dir-locals/eglot-rust-dir-locals.el b/dir-locals/eglot-rust-dir-locals.el index 50471a4..0c7e83d 100644 --- a/dir-locals/eglot-rust-dir-locals.el +++ b/dir-locals/eglot-rust-dir-locals.el @@ -1,16 +1,19 @@ ((rust-ts-mode . ((eval . (progn (require 'rust-mode) - (eglot-ensure) + (require 'eglot) + (advice-add 'eglot-inlay-hints-mode :around 'ignore) + (eglot-ensure) + (company-mode 1) (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 '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"))))) + (keymap-set (current-local-map) + "C-c C-c C-d" + (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")))) - (nil . ((rust-cargo-bin . "env TMPDIR=~/tmp cargo")))) + (rust-rustfmt-switches . ("--edition" "2021"))))) |