Disable on-type formatting in rust.

This was injecting parenthesis into the wrong location.
This commit is contained in:
Tom Alexander 2023-09-21 16:56:59 -04:00
parent e4b10e7260
commit 49fa0eb9cc
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -38,6 +38,10 @@
:hook (
(rust-ts-mode . (lambda ()
(eglot-ensure)
;; Disable on-type formatting which was incorrectly injecting parenthesis into my code.
(make-local-variable 'eglot-ignored-server-capabilities)
(add-to-list 'eglot-ignored-server-capabilities :documentOnTypeFormattingProvider)
;; Configure initialization options
(let ((rust-analyzer-command (locate-rust-analyzer)))
(when rust-analyzer-command
;; (add-to-list 'eglot-server-programs `(rust-ts-mode . (,rust-analyzer-command)))