Rename LSP function and simplify tests (#27313)

While working on a fix I found opportunities to improve readability, but
it's a big rename diff, so I'm landing separately.

Release Notes:

- N/A
This commit is contained in:
João Marcos 2025-03-22 16:23:11 -03:00 committed by GitHub
parent f4d1e7901c
commit 9f0b09007b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 641 additions and 642 deletions

View file

@ -483,7 +483,7 @@ async fn test_remote_lsp(cx: &mut TestAppContext, server_cx: &mut TestAppContext
assert_eq!(lsp_store.as_local().unwrap().language_servers.len(), 1);
});
fake_lsp.handle_request::<lsp::request::Completion, _, _>(|_, _| async move {
fake_lsp.set_request_handler::<lsp::request::Completion, _, _>(|_, _| async move {
Ok(Some(CompletionResponse::Array(vec![lsp::CompletionItem {
label: "boop".to_string(),
..Default::default()
@ -514,7 +514,7 @@ async fn test_remote_lsp(cx: &mut TestAppContext, server_cx: &mut TestAppContext
vec!["boop".to_string()]
);
fake_lsp.handle_request::<lsp::request::Rename, _, _>(|_, _| async move {
fake_lsp.set_request_handler::<lsp::request::Rename, _, _>(|_, _| async move {
Ok(Some(lsp::WorkspaceEdit {
changes: Some(
[(