From f42f70b1d51f25398f840a924dd3d689a2cd573b Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Fri, 11 Jan 2019 21:45:16 -0500 Subject: Switch hover to use MarkupContent MarkedString is deprecated --- crates/ra_lsp_server/src/main_loop/handlers.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'crates/ra_lsp_server/src/main_loop/handlers.rs') diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs index aad9d6568..5ab13542c 100644 --- a/crates/ra_lsp_server/src/main_loop/handlers.rs +++ b/crates/ra_lsp_server/src/main_loop/handlers.rs @@ -4,7 +4,7 @@ use gen_lsp_server::ErrorCode; use languageserver_types::{ CodeActionResponse, Command, Diagnostic, DiagnosticSeverity, DocumentFormattingParams, DocumentHighlight, DocumentSymbol, Documentation, FoldingRange, FoldingRangeKind, - FoldingRangeParams, Hover, HoverContents, Location, MarkedString, MarkupContent, MarkupKind, + FoldingRangeParams, Hover, HoverContents, Location, MarkupContent, MarkupKind, ParameterInformation, ParameterLabel, Position, PrepareRenameResponse, Range, RenameParams, SignatureInformation, SymbolInformation, TextDocumentIdentifier, TextEdit, WorkspaceEdit, }; @@ -515,7 +515,10 @@ pub fn handle_hover( let line_index = world.analysis.file_line_index(position.file_id); let range = info.range.conv_with(&line_index); let res = Hover { - contents: HoverContents::Scalar(MarkedString::String(info.info)), + contents: HoverContents::Markup(MarkupContent { + kind: MarkupKind::Markdown, + value: info.info, + }), range: Some(range), }; Ok(Some(res)) -- cgit v1.2.3