diff options
author | Jeremy Kolb <[email protected]> | 2019-01-22 02:42:37 +0000 |
---|---|---|
committer | Jeremy Kolb <[email protected]> | 2019-01-22 02:42:37 +0000 |
commit | b77d780f0e9e7902695b949a25588fcb66bb5982 (patch) | |
tree | 3f2cde5aafd881efaf2c6da1b2811cbb173b8ed9 /crates/ra_ide_api/src/completion | |
parent | 5d110c0ee2ec50009eb7c552888a73ce8380d34a (diff) |
Thread documentation through FnSignature and CompletionItem
Diffstat (limited to 'crates/ra_ide_api/src/completion')
-rw-r--r-- | crates/ra_ide_api/src/completion/completion_item.rs | 5 |
1 files changed, 5 insertions, 0 deletions
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 { | |||
259 | } | 259 | } |
260 | self.insert_text_format = InsertTextFormat::Snippet; | 260 | self.insert_text_format = InsertTextFormat::Snippet; |
261 | } | 261 | } |
262 | let sig = function.signature(ctx.db); | ||
263 | if !sig.documentation().is_empty() { | ||
264 | self.documentation = Some(sig.documentation().clone()); | ||
265 | } | ||
266 | |||
262 | self.kind = Some(CompletionItemKind::Function); | 267 | self.kind = Some(CompletionItemKind::Function); |
263 | self | 268 | self |
264 | } | 269 | } |