From 6d10b16f79bed9c13427f93a86d56c23bf658631 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Wed, 3 Jul 2024 17:56:01 -0400 Subject: [PATCH] gleam: Include a package name suffix for docs entries (#13798) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR updates the Gleam docs provider to include the package name as a suffix for docs entries: Screenshot 2024-07-03 at 5 48 28 PM 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 --- extensions/gleam/src/hexdocs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/gleam/src/hexdocs.rs b/extensions/gleam/src/hexdocs.rs index cc21746934..26198fc5d1 100644 --- a/extensions/gleam/src/hexdocs.rs +++ b/extensions/gleam/src/hexdocs.rs @@ -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(())