Move docs to Function

This commit is contained in:
Jeremy Kolb 2019-01-22 08:55:05 -05:00
parent b77d780f0e
commit b540451483
3 changed files with 18 additions and 13 deletions

View file

@ -259,9 +259,8 @@ 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());
if let Some(docs) = function.docs(ctx.db) {
self.documentation = Some(docs);
}
self.kind = Some(CompletionItemKind::Function);