diff options
author | Aleksander Vognild Burkow <[email protected]> | 2018-12-29 19:09:42 +0000 |
---|---|---|
committer | Aleksander Vognild Burkow <[email protected]> | 2018-12-29 20:57:46 +0000 |
commit | 8b24f158f75e4496cfc7f8edf9aa41b10dbac9b3 (patch) | |
tree | add7a233ed590a2f66d0e702e968a4011c9d859e /crates/ra_lsp_server/src/main_loop.rs | |
parent | 2aac6b0e34ad22374c87435cf125ed4833e9f6fc (diff) |
Add support for formatting entire document with rustfmt
Attempting to format a document when rustfmt isn't installed will result
in an error being returned to the frontend. An alternative
implementation would be returning zero replacements.
Diffstat (limited to 'crates/ra_lsp_server/src/main_loop.rs')
-rw-r--r-- | crates/ra_lsp_server/src/main_loop.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/ra_lsp_server/src/main_loop.rs b/crates/ra_lsp_server/src/main_loop.rs index 1edb9fae4..97c1be778 100644 --- a/crates/ra_lsp_server/src/main_loop.rs +++ b/crates/ra_lsp_server/src/main_loop.rs | |||
@@ -295,6 +295,7 @@ fn on_request( | |||
295 | .on::<req::PrepareRenameRequest>(handlers::handle_prepare_rename)? | 295 | .on::<req::PrepareRenameRequest>(handlers::handle_prepare_rename)? |
296 | .on::<req::Rename>(handlers::handle_rename)? | 296 | .on::<req::Rename>(handlers::handle_rename)? |
297 | .on::<req::References>(handlers::handle_references)? | 297 | .on::<req::References>(handlers::handle_references)? |
298 | .on::<req::Formatting>(handlers::handle_formatting)? | ||
298 | .finish(); | 299 | .finish(); |
299 | match req { | 300 | match req { |
300 | Ok(id) => { | 301 | Ok(id) => { |