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:
parent
0f1c2e6f2b
commit
d306b531c7
18 changed files with 1124 additions and 252 deletions
|
@ -746,7 +746,10 @@ impl LanguageRegistry {
|
|||
let capabilities = adapter
|
||||
.as_fake()
|
||||
.map(|fake_adapter| fake_adapter.capabilities.clone())
|
||||
.unwrap_or_default();
|
||||
.unwrap_or_else(|| lsp::ServerCapabilities {
|
||||
completion_provider: Some(Default::default()),
|
||||
..Default::default()
|
||||
});
|
||||
|
||||
let (server, mut fake_server) = lsp::FakeLanguageServer::new(
|
||||
server_id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue