Add label_for_completion to extension API (#10175)

This PR adds the ability for extensions to implement
`label_for_completion` to customize completions coming back from the
language server.

We've used the Gleam extension as a motivating example, adding
`label_for_completion` support to it.

Release Notes:

- N/A

---------

Co-authored-by: Max <max@zed.dev>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
Marshall Bowers
2024-04-04 13:56:04 -04:00
committed by GitHub
co-authored by Max Max Brunsfeld
parent 0f1c2e6f2b
commit d306b531c7
18 changed files with 1124 additions and 252 deletions
+2
View File
@@ -9915,6 +9915,8 @@ async fn populate_labels_for_completions(
lsp_adapter
.labels_for_completions(&lsp_completions, language)
.await
.log_err()
.unwrap_or_default()
} else {
Vec::new()
};