diff options
author | Aleksey Kladov <[email protected]> | 2019-12-11 17:34:01 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-12-11 17:34:01 +0000 |
commit | b0a4765059c38e7b614d98015f7544ce0abc1bdf (patch) | |
tree | 8ecd119d1595aa61c9b3076e285eb71371930e10 /crates/ra_lsp_server/tests | |
parent | 1e0bf205eff81f04c0e1e6c208c3489327520c3f (diff) |
Revert "Revert "Support LSP 3.15""
This reverts commit 1e0bf205eff81f04c0e1e6c208c3489327520c3f.
Diffstat (limited to 'crates/ra_lsp_server/tests')
-rw-r--r-- | crates/ra_lsp_server/tests/heavy_tests/main.rs | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/crates/ra_lsp_server/tests/heavy_tests/main.rs b/crates/ra_lsp_server/tests/heavy_tests/main.rs index cfbf16ea5..dff63a12d 100644 --- a/crates/ra_lsp_server/tests/heavy_tests/main.rs +++ b/crates/ra_lsp_server/tests/heavy_tests/main.rs | |||
@@ -4,7 +4,8 @@ use std::{collections::HashMap, time::Instant}; | |||
4 | 4 | ||
5 | use lsp_types::{ | 5 | use lsp_types::{ |
6 | CodeActionContext, DidOpenTextDocumentParams, DocumentFormattingParams, FormattingOptions, | 6 | CodeActionContext, DidOpenTextDocumentParams, DocumentFormattingParams, FormattingOptions, |
7 | Position, Range, TextDocumentItem, TextDocumentPositionParams, | 7 | PartialResultParams, Position, Range, TextDocumentItem, TextDocumentPositionParams, |
8 | WorkDoneProgressParams, | ||
8 | }; | 9 | }; |
9 | use ra_lsp_server::req::{ | 10 | use ra_lsp_server::req::{ |
10 | CodeActionParams, CodeActionRequest, Completion, CompletionParams, DidOpenTextDocument, | 11 | CodeActionParams, CodeActionRequest, Completion, CompletionParams, DidOpenTextDocument, |
@@ -48,6 +49,8 @@ use std::collections::Spam; | |||
48 | Position::new(0, 23), | 49 | Position::new(0, 23), |
49 | ), | 50 | ), |
50 | context: None, | 51 | context: None, |
52 | partial_result_params: PartialResultParams::default(), | ||
53 | work_done_progress_params: WorkDoneProgressParams::default(), | ||
51 | }); | 54 | }); |
52 | assert!(format!("{}", res).contains("HashMap")); | 55 | assert!(format!("{}", res).contains("HashMap")); |
53 | eprintln!("completion took {:?}", completion_start.elapsed()); | 56 | eprintln!("completion took {:?}", completion_start.elapsed()); |
@@ -211,8 +214,12 @@ pub use std::collections::HashMap; | |||
211 | options: FormattingOptions { | 214 | options: FormattingOptions { |
212 | tab_size: 4, | 215 | tab_size: 4, |
213 | insert_spaces: false, | 216 | insert_spaces: false, |
217 | insert_final_newline: None, | ||
218 | trim_final_newlines: None, | ||
219 | trim_trailing_whitespace: None, | ||
214 | properties: HashMap::new(), | 220 | properties: HashMap::new(), |
215 | }, | 221 | }, |
222 | work_done_progress_params: WorkDoneProgressParams::default(), | ||
216 | }, | 223 | }, |
217 | json!([ | 224 | json!([ |
218 | { | 225 | { |
@@ -272,7 +279,11 @@ pub use std::collections::HashMap; | |||
272 | tab_size: 4, | 279 | tab_size: 4, |
273 | insert_spaces: false, | 280 | insert_spaces: false, |
274 | properties: HashMap::new(), | 281 | properties: HashMap::new(), |
282 | insert_final_newline: None, | ||
283 | trim_final_newlines: None, | ||
284 | trim_trailing_whitespace: None, | ||
275 | }, | 285 | }, |
286 | work_done_progress_params: WorkDoneProgressParams::default(), | ||
276 | }, | 287 | }, |
277 | json!([ | 288 | json!([ |
278 | { | 289 | { |
@@ -325,6 +336,8 @@ fn main() {} | |||
325 | text_document: server.doc_id("src/lib.rs"), | 336 | text_document: server.doc_id("src/lib.rs"), |
326 | range: Range::new(Position::new(0, 4), Position::new(0, 7)), | 337 | range: Range::new(Position::new(0, 4), Position::new(0, 7)), |
327 | context: empty_context(), | 338 | context: empty_context(), |
339 | partial_result_params: PartialResultParams::default(), | ||
340 | work_done_progress_params: WorkDoneProgressParams::default(), | ||
328 | }, | 341 | }, |
329 | json!([ | 342 | json!([ |
330 | { | 343 | { |
@@ -356,6 +369,8 @@ fn main() {} | |||
356 | text_document: server.doc_id("src/lib.rs"), | 369 | text_document: server.doc_id("src/lib.rs"), |
357 | range: Range::new(Position::new(2, 4), Position::new(2, 7)), | 370 | range: Range::new(Position::new(2, 4), Position::new(2, 7)), |
358 | context: empty_context(), | 371 | context: empty_context(), |
372 | partial_result_params: PartialResultParams::default(), | ||
373 | work_done_progress_params: WorkDoneProgressParams::default(), | ||
359 | }, | 374 | }, |
360 | json!([]), | 375 | json!([]), |
361 | ); | 376 | ); |
@@ -404,6 +419,8 @@ fn main() {{}} | |||
404 | text_document: server.doc_id("src/lib.rs"), | 419 | text_document: server.doc_id("src/lib.rs"), |
405 | range: Range::new(Position::new(0, 4), Position::new(0, 7)), | 420 | range: Range::new(Position::new(0, 4), Position::new(0, 7)), |
406 | context: empty_context(), | 421 | context: empty_context(), |
422 | partial_result_params: PartialResultParams::default(), | ||
423 | work_done_progress_params: WorkDoneProgressParams::default(), | ||
407 | }, | 424 | }, |
408 | json!([ | 425 | json!([ |
409 | { | 426 | { |
@@ -435,6 +452,8 @@ fn main() {{}} | |||
435 | text_document: server.doc_id("src/lib.rs"), | 452 | text_document: server.doc_id("src/lib.rs"), |
436 | range: Range::new(Position::new(2, 4), Position::new(2, 7)), | 453 | range: Range::new(Position::new(2, 4), Position::new(2, 7)), |
437 | context: empty_context(), | 454 | context: empty_context(), |
455 | partial_result_params: PartialResultParams::default(), | ||
456 | work_done_progress_params: WorkDoneProgressParams::default(), | ||
438 | }, | 457 | }, |
439 | json!([]), | 458 | json!([]), |
440 | ); | 459 | ); |