diff options
author | Josh Stone <[email protected]> | 2020-09-16 18:05:41 +0100 |
---|---|---|
committer | Josh Stone <[email protected]> | 2020-09-16 18:05:41 +0100 |
commit | 29c34213916f8be84d5c715899e5e0629e36adac (patch) | |
tree | f6e9e0cc4799d3172957ceea1daa5cd1ad754fa8 /crates/hir_def/src/nameres/collector.rs | |
parent | b14bf68ce62bc712ed9ca9f977dd7efbd6fe4fd7 (diff) |
Don't return any TextEdit if formatting is unchanged
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.
Diffstat (limited to 'crates/hir_def/src/nameres/collector.rs')
0 files changed, 0 insertions, 0 deletions