feat(lsp): provide registry details on hover if present (#13294)

Closes: #13272
This commit is contained in:
Kitson Kelly 2022-01-07 11:27:13 +11:00 committed by GitHub
parent 2067820714
commit 57bfa87b2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 111 additions and 6 deletions

View file

@ -1119,6 +1119,12 @@ impl Inner {
),
(None, None, _) => unreachable!("{}", json!(params)),
};
let value =
if let Some(docs) = self.module_registries.get_hover(&dep).await {
format!("{}\n\n---\n\n{}", value, docs)
} else {
value
};
Some(Hover {
contents: HoverContents::Markup(MarkupContent {
kind: MarkupKind::Markdown,