Resolve documentation for visible completions (#21705)

Release Notes:

- Improved LSP resolution of documentation for completions. It now
queries documentation for visible completions and avoids doing too many
redundant queries.

---

In #21286, documentation resolution was made more efficient by only
resolving the current completion. However, this meant that single line
documentation shown inline in the menu was missing until scrolled
to. This also meant that it would wait for navigation to resolve
completion docs, leading to lag for displaying documentation.

This change resolves this by attempting to fetch all the completions
that will be shown. It also mostly avoids re-resolving completions. It
intentionally re-resolves the current selection on navigation, as some
language servers will respond with more information later on.
This commit is contained in:
Michael Sloan 2024-12-10 12:25:30 -07:00 committed by GitHub
parent ab1e9bf270
commit ab595b0d55
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 286 additions and 184 deletions

View file

@ -24,6 +24,7 @@ futures-lite.workspace = true
futures.workspace = true
git2 = { workspace = true, optional = true }
globset.workspace = true
itertools.workspace = true
log.workspace = true
rand = { workspace = true, optional = true }
regex.workspace = true