diff options
Diffstat (limited to 'crates/ra_lsp_server/src/main_loop')
-rw-r--r-- | crates/ra_lsp_server/src/main_loop/handlers.rs | 7 |
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 7f6146b6c..a781df181 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; | |||
4 | use languageserver_types::{ | 4 | use languageserver_types::{ |
5 | CodeActionResponse, Command, CodeLens, Diagnostic, DiagnosticSeverity, DocumentFormattingParams, | 5 | CodeActionResponse, Command, CodeLens, 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 | }; |
@@ -422,7 +422,10 @@ pub fn handle_hover( | |||
422 | let line_index = world.analysis.file_line_index(position.file_id); | 422 | let line_index = world.analysis.file_line_index(position.file_id); |
423 | let range = info.range.conv_with(&line_index); | 423 | let range = info.range.conv_with(&line_index); |
424 | let res = Hover { | 424 | let res = Hover { |
425 | contents: HoverContents::Scalar(MarkedString::String(info.info)), | 425 | contents: HoverContents::Markup(MarkupContent { |
426 | kind: MarkupKind::Markdown, | ||
427 | value: info.info, | ||
428 | }), | ||
426 | range: Some(range), | 429 | range: Some(range), |
427 | }; | 430 | }; |
428 | Ok(Some(res)) | 431 | Ok(Some(res)) |