From b77d780f0e9e7902695b949a25588fcb66bb5982 Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Mon, 21 Jan 2019 21:42:37 -0500 Subject: Thread documentation through FnSignature and CompletionItem --- crates/ra_ide_api/src/completion/completion_item.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'crates/ra_ide_api') diff --git a/crates/ra_ide_api/src/completion/completion_item.rs b/crates/ra_ide_api/src/completion/completion_item.rs index 672c7ed0e..dfaadbb20 100644 --- a/crates/ra_ide_api/src/completion/completion_item.rs +++ b/crates/ra_ide_api/src/completion/completion_item.rs @@ -259,6 +259,11 @@ impl Builder { } self.insert_text_format = InsertTextFormat::Snippet; } + let sig = function.signature(ctx.db); + if !sig.documentation().is_empty() { + self.documentation = Some(sig.documentation().clone()); + } + self.kind = Some(CompletionItemKind::Function); self } -- cgit v1.2.3