From e293a16d6b430befe6eb8be315ad60e7b2b10926 Mon Sep 17 00:00:00 2001 From: "Jeremy A. Kolb" Date: Sun, 23 Sep 2018 11:10:57 -0400 Subject: Support LSP 3.13 --- crates/ra_lsp_server/src/main_loop/handlers.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_lsp_server/src/main_loop') 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; use languageserver_types::{ Diagnostic, DiagnosticSeverity, DocumentSymbol, - Command, TextDocumentIdentifier, + CodeActionResponse, Command, TextDocumentIdentifier, SymbolInformation, Position, Location, TextEdit, CompletionItem, InsertTextFormat, CompletionItemKind, }; @@ -369,7 +369,7 @@ pub fn handle_code_action( world: ServerWorld, params: req::CodeActionParams, _token: JobToken, -) -> Result>> { +) -> Result> { let file_id = params.text_document.try_conv_with(&world)?; let line_index = world.analysis().file_line_index(file_id); let range = params.range.conv_with(&line_index); @@ -392,7 +392,7 @@ pub fn handle_code_action( res.push(cmd); } - Ok(Some(res)) + Ok(Some(CodeActionResponse::Commands(res))) } pub fn publish_diagnostics( -- cgit v1.2.3