gleam: Include a package name suffix for docs entries (#13798)

This PR updates the Gleam docs provider to include the package name as a
suffix for docs entries:

<img width="639" alt="Screenshot 2024-07-03 at 5 48 28 PM"
src="https://github.com/zed-industries/zed/assets/1486634/0d98ffba-fbab-4511-ae16-e1e742d56f93">

This will help disambiguate modules with the same names from different
packages, as well as help out with providing better completions when the
package name and top-level module name do not match.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-07-03 17:56:01 -04:00 committed by GitHub
parent 05af87e416
commit 6d10b16f79
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,7 +28,7 @@ pub fn index(package: String, database: &KeyValueStore) -> Result<()> {
let (markdown, _modules) = convert_hexdocs_to_markdown(response.body.as_bytes())?;
database.insert(&module, &markdown)?;
database.insert(&format!("{module} ({package})"), &markdown)?;
}
Ok(())