Allow extensions to suggest packages for /docs completions (#16185)
This PR gives extensions the ability to suggest packages to show up in `/docs` completions by default. Release Notes: - N/A
This commit is contained in:
@@ -246,6 +246,17 @@ impl zed::Extension for GleamExtension {
|
||||
}
|
||||
}
|
||||
|
||||
fn suggest_docs_packages(&self, provider: String) -> Result<Vec<String>, String> {
|
||||
match provider.as_str() {
|
||||
"gleam-hexdocs" => Ok(vec![
|
||||
"gleam_stdlib".to_string(),
|
||||
"birdie".to_string(),
|
||||
"startest".to_string(),
|
||||
]),
|
||||
_ => Ok(Vec::new()),
|
||||
}
|
||||
}
|
||||
|
||||
fn index_docs(
|
||||
&self,
|
||||
provider: String,
|
||||
|
||||
Reference in New Issue
Block a user