diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-08 13:32:16 +0100 |
---|---|---|
committer | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-08 13:32:16 +0100 |
commit | 64b718bff7df788bfe6e8e2dce24b20faf9be235 (patch) | |
tree | b074a36491d838bae9405ac42f3e64ef9b4dcd60 /crates/ra_lsp_server/tests | |
parent | 5ce2b4819ec37faa6b7ac1afe006ae03865ad544 (diff) | |
parent | e075e096cf4970014d2c0829476fd7a45a3f32b1 (diff) |
Merge #1511
1511: Send old-style responsed to goto definition unless the client explicitelly opts in r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_lsp_server/tests')
-rw-r--r-- | crates/ra_lsp_server/tests/heavy_tests/support.rs | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/crates/ra_lsp_server/tests/heavy_tests/support.rs b/crates/ra_lsp_server/tests/heavy_tests/support.rs index a5e352da1..5dddbbe17 100644 --- a/crates/ra_lsp_server/tests/heavy_tests/support.rs +++ b/crates/ra_lsp_server/tests/heavy_tests/support.rs | |||
@@ -13,7 +13,8 @@ use lsp_types::{ | |||
13 | notification::DidOpenTextDocument, | 13 | notification::DidOpenTextDocument, |
14 | notification::{Notification, ShowMessage}, | 14 | notification::{Notification, ShowMessage}, |
15 | request::{Request, Shutdown}, | 15 | request::{Request, Shutdown}, |
16 | DidOpenTextDocumentParams, TextDocumentIdentifier, TextDocumentItem, Url, | 16 | ClientCapabilities, DidOpenTextDocumentParams, GotoCapability, TextDocumentClientCapabilities, |
17 | TextDocumentIdentifier, TextDocumentItem, Url, | ||
17 | }; | 18 | }; |
18 | use serde::Serialize; | 19 | use serde::Serialize; |
19 | use serde_json::{to_string_pretty, Value}; | 20 | use serde_json::{to_string_pretty, Value}; |
@@ -92,8 +93,25 @@ impl Server { | |||
92 | "test server", | 93 | "test server", |
93 | 128, | 94 | 128, |
94 | move |msg_receiver, msg_sender| { | 95 | move |msg_receiver, msg_sender| { |
95 | main_loop(roots, InitializationOptions::default(), &msg_receiver, &msg_sender) | 96 | main_loop( |
96 | .unwrap() | 97 | roots, |
98 | ClientCapabilities { | ||
99 | workspace: None, | ||
100 | text_document: Some(TextDocumentClientCapabilities { | ||
101 | definition: Some(GotoCapability { | ||
102 | dynamic_registration: None, | ||
103 | link_support: Some(true), | ||
104 | }), | ||
105 | ..Default::default() | ||
106 | }), | ||
107 | window: None, | ||
108 | experimental: None, | ||
109 | }, | ||
110 | InitializationOptions::default(), | ||
111 | &msg_receiver, | ||
112 | &msg_sender, | ||
113 | ) | ||
114 | .unwrap() | ||
97 | }, | 115 | }, |
98 | ); | 116 | ); |
99 | let res = Server { req_id: Cell::new(1), dir, messages: Default::default(), worker }; | 117 | let res = Server { req_id: Cell::new(1), dir, messages: Default::default(), worker }; |