Add some default settings for rust-analyzer.
This commit is contained in:
parent
db5b400408
commit
b86d7813a9
@ -40,7 +40,12 @@
|
|||||||
(eglot-ensure)
|
(eglot-ensure)
|
||||||
(let ((rust-analyzer-command (locate-rust-analyzer)))
|
(let ((rust-analyzer-command (locate-rust-analyzer)))
|
||||||
(when rust-analyzer-command
|
(when rust-analyzer-command
|
||||||
(add-to-list 'eglot-server-programs `(rust-ts-mode . (,rust-analyzer-command)))
|
;; (add-to-list 'eglot-server-programs `(rust-ts-mode . (,rust-analyzer-command)))
|
||||||
|
(add-to-list 'eglot-server-programs `(rust-ts-mode . (,rust-analyzer-command :initializationOptions (:imports (:granularity (:enforce t :group "item")
|
||||||
|
:merge (:glob nil)
|
||||||
|
:prefix "self")
|
||||||
|
:inlayHints (:maxLength nil)
|
||||||
|
:workspace (:symbol (:search (:limit 1024)))))))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(add-hook 'before-save-hook 'eglot-format-buffer nil 'local)
|
(add-hook 'before-save-hook 'eglot-format-buffer nil 'local)
|
||||||
@ -76,7 +81,7 @@
|
|||||||
;;
|
;;
|
||||||
;; (
|
;; (
|
||||||
;; (rust-ts-mode . ((eglot-workspace-configuration
|
;; (rust-ts-mode . ((eglot-workspace-configuration
|
||||||
;; . (:rust-analyzer (:cargo (:features "compare"))))
|
;; . (:rust-analyzer (:cargo (:noDefaultFeatures t :features "compare"))))
|
||||||
;; ))
|
;; ))
|
||||||
;; )
|
;; )
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user