diff --git a/ansible/roles/emacs/files/elisp/lang-rust.el b/ansible/roles/emacs/files/elisp/lang-rust.el index bc91069..169547b 100644 --- a/ansible/roles/emacs/files/elisp/lang-rust.el +++ b/ansible/roles/emacs/files/elisp/lang-rust.el @@ -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)))