mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00

I found that `textDocument/formatting` was always returning a full `TextEdit` replacement, even when there are no changes, which caused Vim (w/ vim-lsp) to always indicate a modified buffer after formatting. We can easily compare whether there were changes and return `null` if not, so the client knows there's nothing to do.