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:
parent
c6a1d9aa33
commit
aa12ae0e3c
5 changed files with 64 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue