aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_db
diff options
context:
space:
mode:
authorJosh Stone <[email protected]>2020-09-16 18:05:41 +0100
committerJosh Stone <[email protected]>2020-09-16 18:05:41 +0100
commit29c34213916f8be84d5c715899e5e0629e36adac (patch)
treef6e9e0cc4799d3172957ceea1daa5cd1ad754fa8 /crates/ide_db
parentb14bf68ce62bc712ed9ca9f977dd7efbd6fe4fd7 (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/ide_db')
0 files changed, 0 insertions, 0 deletions