Unannotated types hover

This commit is contained in:
faldor20 2024-03-10 20:52:25 +10:00
parent cdf218fe7a
commit 0b56882785
No known key found for this signature in database
GPG key ID: F2216079B890CD57
2 changed files with 14 additions and 3 deletions

View file

@ -239,8 +239,20 @@ fn generate_entry_docs(
}
}
ValueDef::Body(_, _) => {
// TODO generate docs for un-annotated bodies
ValueDef::Body(pattern, _) => {
if let Pattern::Identifier(identifier) = pattern.value {
// Check if this module exposes the def
if let Some(ident_id) = ident_ids.get_id(identifier) {
let doc_def = DocDef {
name: identifier.to_string(),
type_annotation: TypeAnnotation::NoTypeAnn,
type_vars: Vec::new(),
symbol: Symbol::new(home, ident_id),
docs,
};
acc.push(DocEntry::DocDef(doc_def));
}
}
}
ValueDef::Dbg { .. } => {