aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-01-12 11:02:42 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-01-12 11:02:42 +0000
commite9e397e705ad0bec9775067b10109e35ebefc493 (patch)
tree8bdb1d6036d381e34d0d70880da1edbec0df5542 /crates/ra_lsp_server
parentcca39ebc24d3dfcfcbb2565843ee9f70891cb139 (diff)
parentf42f70b1d51f25398f840a924dd3d689a2cd573b (diff)
Merge #501
501: Switch hover to use MarkupContent r=matklad a=kjeremy MarkedString is deprecated Co-authored-by: Jeremy Kolb <[email protected]>
Diffstat (limited to 'crates/ra_lsp_server')
-rw-r--r--crates/ra_lsp_server/src/main_loop/handlers.rs7
1 files changed, 5 insertions, 2 deletions
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;
4use languageserver_types::{ 4use languageserver_types::{
5 CodeActionResponse, Command, Diagnostic, DiagnosticSeverity, DocumentFormattingParams, 5 CodeActionResponse, Command, Diagnostic, DiagnosticSeverity, DocumentFormattingParams,
6 DocumentHighlight, DocumentSymbol, Documentation, FoldingRange, FoldingRangeKind, 6 DocumentHighlight, DocumentSymbol, Documentation, FoldingRange, FoldingRangeKind,
7 FoldingRangeParams, Hover, HoverContents, Location, MarkedString, MarkupContent, MarkupKind, 7 FoldingRangeParams, Hover, HoverContents, Location, MarkupContent, MarkupKind,
8 ParameterInformation, ParameterLabel, Position, PrepareRenameResponse, Range, RenameParams, 8 ParameterInformation, ParameterLabel, Position, PrepareRenameResponse, Range, RenameParams,
9 SignatureInformation, SymbolInformation, TextDocumentIdentifier, TextEdit, WorkspaceEdit, 9 SignatureInformation, SymbolInformation, TextDocumentIdentifier, TextEdit, WorkspaceEdit,
10}; 10};
@@ -515,7 +515,10 @@ pub fn handle_hover(
515 let line_index = world.analysis.file_line_index(position.file_id); 515 let line_index = world.analysis.file_line_index(position.file_id);
516 let range = info.range.conv_with(&line_index); 516 let range = info.range.conv_with(&line_index);
517 let res = Hover { 517 let res = Hover {
518 contents: HoverContents::Scalar(MarkedString::String(info.info)), 518 contents: HoverContents::Markup(MarkupContent {
519 kind: MarkupKind::Markdown,
520 value: info.info,
521 }),
519 range: Some(range), 522 range: Some(range),
520 }; 523 };
521 Ok(Some(res)) 524 Ok(Some(res))