Add missing details for type completion

This commit is contained in:
Laurenz 2023-11-28 12:13:43 +01:00
parent 0daad6ea63
commit b5ef789315

View File

@ -1141,6 +1141,7 @@ impl<'a> CompletionContext<'a> {
let detail = docs.map(Into::into).or_else(|| match value {
Value::Symbol(_) => None,
Value::Func(func) => func.docs().map(plain_docs_sentence),
Value::Type(ty) => Some(plain_docs_sentence(ty.docs())),
v => {
let repr = v.repr();
(repr.as_str() != label).then_some(repr)