diff options
Diffstat (limited to 'crates/ra_lsp_server')
-rw-r--r-- | crates/ra_lsp_server/src/main_loop/handlers.rs | 27 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/project_model/sysroot.rs | 1 |
2 files changed, 15 insertions, 13 deletions
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs index 9e2cc8ffc..4720a8843 100644 --- a/crates/ra_lsp_server/src/main_loop/handlers.rs +++ b/crates/ra_lsp_server/src/main_loop/handlers.rs | |||
@@ -599,9 +599,6 @@ pub fn handle_code_action( | |||
599 | let title = source_edit.label.clone(); | 599 | let title = source_edit.label.clone(); |
600 | let edit = source_edit.try_conv_with(&world)?; | 600 | let edit = source_edit.try_conv_with(&world)?; |
601 | 601 | ||
602 | // We cannot use the 'editor.action.showReferences' command directly | ||
603 | // because that command requires vscode types which we convert in the handler | ||
604 | // on the client side. | ||
605 | let cmd = Command { | 602 | let cmd = Command { |
606 | title, | 603 | title, |
607 | command: "rust-analyzer.applySourceChange".to_string(), | 604 | command: "rust-analyzer.applySourceChange".to_string(), |
@@ -713,21 +710,25 @@ pub fn handle_code_lens_resolve(world: ServerWorld, code_lens: CodeLens) -> Resu | |||
713 | format!("{} implementations", locations.len()) | 710 | format!("{} implementations", locations.len()) |
714 | }; | 711 | }; |
715 | 712 | ||
713 | // We cannot use the 'editor.action.showReferences' command directly | ||
714 | // because that command requires vscode types which we convert in the handler | ||
715 | // on the client side. | ||
716 | let cmd = Command { | ||
717 | title, | ||
718 | command: "rust-analyzer.showReferences".into(), | ||
719 | arguments: Some(vec![ | ||
720 | to_value(&Ser::new(&lens_params.text_document.uri)).unwrap(), | ||
721 | to_value(code_lens.range.start).unwrap(), | ||
722 | to_value(locations).unwrap(), | ||
723 | ]), | ||
724 | }; | ||
716 | return Ok(CodeLens { | 725 | return Ok(CodeLens { |
717 | range: code_lens.range, | 726 | range: code_lens.range, |
718 | command: Some(Command { | 727 | command: Some(cmd), |
719 | title, | ||
720 | command: "rust-analyzer.showReferences".into(), | ||
721 | arguments: Some(vec![ | ||
722 | to_value(&Ser::new(&lens_params.text_document.uri)).unwrap(), | ||
723 | to_value(code_lens.range.start).unwrap(), | ||
724 | to_value(locations).unwrap(), | ||
725 | ]), | ||
726 | }), | ||
727 | data: None, | 728 | data: None, |
728 | }); | 729 | }); |
729 | } | 730 | } |
730 | _ => { | 731 | None => { |
731 | return Ok(CodeLens { | 732 | return Ok(CodeLens { |
732 | range: code_lens.range, | 733 | range: code_lens.range, |
733 | command: Some(Command { | 734 | command: Some(Command { |
diff --git a/crates/ra_lsp_server/src/project_model/sysroot.rs b/crates/ra_lsp_server/src/project_model/sysroot.rs index 1e0604bf5..fb4685671 100644 --- a/crates/ra_lsp_server/src/project_model/sysroot.rs +++ b/crates/ra_lsp_server/src/project_model/sysroot.rs | |||
@@ -127,6 +127,7 @@ rustc_tsan | |||
127 | syntax"; | 127 | syntax"; |
128 | 128 | ||
129 | const STD_DEPS: &str = " | 129 | const STD_DEPS: &str = " |
130 | alloc | ||
130 | alloc_jemalloc | 131 | alloc_jemalloc |
131 | alloc_system | 132 | alloc_system |
132 | core | 133 | core |