From 23bac120625ca96402426e241c91ed5f3d7ccc02 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 30 Dec 2019 22:18:16 +0100 Subject: Retry inlay hints on content modified error --- crates/ra_lsp_server/src/main_loop.rs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'crates/ra_lsp_server') diff --git a/crates/ra_lsp_server/src/main_loop.rs b/crates/ra_lsp_server/src/main_loop.rs index af1a487de..4336583fe 100644 --- a/crates/ra_lsp_server/src/main_loop.rs +++ b/crates/ra_lsp_server/src/main_loop.rs @@ -709,16 +709,11 @@ where Ok(lsp_error) => Response::new_err(id, lsp_error.code, lsp_error.message), Err(e) => { if is_canceled(&e) { - // FIXME: When https://github.com/Microsoft/vscode-languageserver-node/issues/457 - // gets fixed, we can return the proper response. - // This works around the issue where "content modified" error would continuously - // show an message pop-up in VsCode - // Response::err( - // id, - // ErrorCode::ContentModified as i32, - // "content modified".to_string(), - // ) - Response::new_ok(id, ()) + Response::new_err( + id, + ErrorCode::ContentModified as i32, + "content modified".to_string(), + ) } else { Response::new_err(id, ErrorCode::InternalError as i32, e.to_string()) } -- cgit v1.2.3