diff options
Diffstat (limited to 'crates/ra_lsp_server')
-rw-r--r-- | crates/ra_lsp_server/src/main_loop/handlers.rs | 13 |
1 files changed, 11 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 4ac08e527..20cb5f772 100644 --- a/crates/ra_lsp_server/src/main_loop/handlers.rs +++ b/crates/ra_lsp_server/src/main_loop/handlers.rs | |||
@@ -5,7 +5,7 @@ use languageserver_types::{ | |||
5 | CodeActionResponse, Command, CompletionItem, CompletionItemKind, Diagnostic, | 5 | CodeActionResponse, Command, CompletionItem, CompletionItemKind, Diagnostic, |
6 | DiagnosticSeverity, DocumentSymbol, FoldingRange, FoldingRangeKind, FoldingRangeParams, | 6 | DiagnosticSeverity, DocumentSymbol, FoldingRange, FoldingRangeKind, FoldingRangeParams, |
7 | InsertTextFormat, Location, Position, SymbolInformation, TextDocumentIdentifier, TextEdit, | 7 | InsertTextFormat, Location, Position, SymbolInformation, TextDocumentIdentifier, TextEdit, |
8 | RenameParams, WorkspaceEdit, PrepareRenameResponse | 8 | RenameParams, WorkspaceEdit, PrepareRenameResponse, Documentation, MarkupContent, MarkupKind |
9 | }; | 9 | }; |
10 | use gen_lsp_server::ErrorCode; | 10 | use gen_lsp_server::ErrorCode; |
11 | use ra_analysis::{FileId, FoldKind, Query, RunnableKind}; | 11 | use ra_analysis::{FileId, FoldKind, Query, RunnableKind}; |
@@ -465,9 +465,18 @@ pub fn handle_signature_help( | |||
465 | }) | 465 | }) |
466 | .collect(); | 466 | .collect(); |
467 | 467 | ||
468 | let documentation = if let Some(doc) = descriptor.doc { | ||
469 | Some(Documentation::MarkupContent(MarkupContent { | ||
470 | kind: MarkupKind::Markdown, | ||
471 | value: doc | ||
472 | })) | ||
473 | } else { | ||
474 | None | ||
475 | }; | ||
476 | |||
468 | let sig_info = SignatureInformation { | 477 | let sig_info = SignatureInformation { |
469 | label: descriptor.label, | 478 | label: descriptor.label, |
470 | documentation: None, | 479 | documentation, |
471 | parameters: Some(parameters), | 480 | parameters: Some(parameters), |
472 | }; | 481 | }; |
473 | 482 | ||