Respect language server's capabilities when calling GetReferences
(#10285)
This PR makes Zed respect the language server's capabilities when calling the `GetReferences` command (used in "Find All References", etc.). This fixes a crash that could occur when using Zed with Gleam v1.0. Release Notes: - Made "Find All References" respect the language server's capabilities. This fixes some instances where certain language servers would stop working after receiving a "Find All References" request. --------- Co-authored-by: Max <max@zed.dev>
This commit is contained in:
parent
f1428fea4e
commit
56c0345cf3
2 changed files with 18 additions and 3 deletions
|
@ -4659,9 +4659,16 @@ async fn test_references(
|
|||
let active_call_a = cx_a.read(ActiveCall::global);
|
||||
|
||||
client_a.language_registry().add(rust_lang());
|
||||
let mut fake_language_servers = client_a
|
||||
.language_registry()
|
||||
.register_fake_lsp_adapter("Rust", Default::default());
|
||||
let mut fake_language_servers = client_a.language_registry().register_fake_lsp_adapter(
|
||||
"Rust",
|
||||
FakeLspAdapter {
|
||||
capabilities: lsp::ServerCapabilities {
|
||||
references_provider: Some(lsp::OneOf::Left(true)),
|
||||
..Default::default()
|
||||
},
|
||||
..Default::default()
|
||||
},
|
||||
);
|
||||
|
||||
client_a
|
||||
.fs()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue