Skip to content

Is there a way to disable textDocument/onTypeFormatting from rust-analyzer? #1393

Closed Answered by antifuchs
antifuchs asked this question in Q&A
Discussion options

You must be logged in to vote

Answering my own question - eglot-ignored-server-capabilities has a setting for this!

(add-hook 'rust-ts-mode-hook
          (defun asf--turn-off-rust-on-type-formatting ()
            (setq-local eglot-ignored-server-capabilities
                        (cons :documentOnTypeFormattingProvider
                              eglot-ignored-server-capabilities))))

Is what I ended up doing, and it works nicely. Phew!

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by antifuchs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant