aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/src/main_loop
diff options
context:
space:
mode:
authorJeremy A. Kolb <[email protected]>2018-09-23 16:10:57 +0100
committerJeremy A. Kolb <[email protected]>2018-09-23 16:10:57 +0100
commite293a16d6b430befe6eb8be315ad60e7b2b10926 (patch)
tree60ed50d3f2a625ce6a9021715ac2a67ef30af6ca /crates/ra_lsp_server/src/main_loop
parentf5808b21a423235037a487d877e23deb3e602f37 (diff)
Support LSP 3.13
Diffstat (limited to 'crates/ra_lsp_server/src/main_loop')
-rw-r--r--crates/ra_lsp_server/src/main_loop/handlers.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs
index b2ebc9cdc..2d9391859 100644
--- a/crates/ra_lsp_server/src/main_loop/handlers.rs
+++ b/crates/ra_lsp_server/src/main_loop/handlers.rs
@@ -2,7 +2,7 @@ use std::collections::HashMap;
2 2
3use languageserver_types::{ 3use languageserver_types::{
4 Diagnostic, DiagnosticSeverity, DocumentSymbol, 4 Diagnostic, DiagnosticSeverity, DocumentSymbol,
5 Command, TextDocumentIdentifier, 5 CodeActionResponse, Command, TextDocumentIdentifier,
6 SymbolInformation, Position, Location, TextEdit, 6 SymbolInformation, Position, Location, TextEdit,
7 CompletionItem, InsertTextFormat, CompletionItemKind, 7 CompletionItem, InsertTextFormat, CompletionItemKind,
8}; 8};
@@ -369,7 +369,7 @@ pub fn handle_code_action(
369 world: ServerWorld, 369 world: ServerWorld,
370 params: req::CodeActionParams, 370 params: req::CodeActionParams,
371 _token: JobToken, 371 _token: JobToken,
372) -> Result<Option<Vec<Command>>> { 372) -> Result<Option<CodeActionResponse>> {
373 let file_id = params.text_document.try_conv_with(&world)?; 373 let file_id = params.text_document.try_conv_with(&world)?;
374 let line_index = world.analysis().file_line_index(file_id); 374 let line_index = world.analysis().file_line_index(file_id);
375 let range = params.range.conv_with(&line_index); 375 let range = params.range.conv_with(&line_index);
@@ -392,7 +392,7 @@ pub fn handle_code_action(
392 res.push(cmd); 392 res.push(cmd);
393 } 393 }
394 394
395 Ok(Some(res)) 395 Ok(Some(CodeActionResponse::Commands(res)))
396} 396}
397 397
398pub fn publish_diagnostics( 398pub fn publish_diagnostics(