diff options
Diffstat (limited to 'crates/ra_lsp_server')
-rw-r--r-- | crates/ra_lsp_server/src/main_loop.rs | 17 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/main_loop/handlers.rs | 2 |
2 files changed, 14 insertions, 5 deletions
diff --git a/crates/ra_lsp_server/src/main_loop.rs b/crates/ra_lsp_server/src/main_loop.rs index 06443bb76..ce50fb301 100644 --- a/crates/ra_lsp_server/src/main_loop.rs +++ b/crates/ra_lsp_server/src/main_loop.rs | |||
@@ -416,11 +416,20 @@ impl<'a> PoolDispatcher<'a> { | |||
416 | } | 416 | } |
417 | Err(e) => { | 417 | Err(e) => { |
418 | if is_canceled(&e) { | 418 | if is_canceled(&e) { |
419 | RawResponse::err( | 419 | // FIXME: When https://github.com/Microsoft/vscode-languageserver-node/issues/457 |
420 | // gets fixed, we can return the proper response. | ||
421 | // This works around the issue where "content modified" error would continuously | ||
422 | // show an message pop-up in VsCode | ||
423 | // RawResponse::err( | ||
424 | // id, | ||
425 | // ErrorCode::ContentModified as i32, | ||
426 | // "content modified".to_string(), | ||
427 | // ) | ||
428 | RawResponse { | ||
420 | id, | 429 | id, |
421 | ErrorCode::ContentModified as i32, | 430 | result: Some(serde_json::to_value(&()).unwrap()), |
422 | "content modified".to_string(), | 431 | error: None, |
423 | ) | 432 | } |
424 | } else { | 433 | } else { |
425 | RawResponse::err( | 434 | RawResponse::err( |
426 | id, | 435 | id, |
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs index 5da731801..dce6fcc67 100644 --- a/crates/ra_lsp_server/src/main_loop/handlers.rs +++ b/crates/ra_lsp_server/src/main_loop/handlers.rs | |||
@@ -441,7 +441,7 @@ pub fn handle_hover( | |||
441 | let res = Hover { | 441 | let res = Hover { |
442 | contents: HoverContents::Markup(MarkupContent { | 442 | contents: HoverContents::Markup(MarkupContent { |
443 | kind: MarkupKind::Markdown, | 443 | kind: MarkupKind::Markdown, |
444 | value: info.info, | 444 | value: info.info.to_markup(), |
445 | }), | 445 | }), |
446 | range: Some(range), | 446 | range: Some(range), |
447 | }; | 447 | }; |