diff --git a/crates/language/src/language.rs b/crates/language/src/language.rs index ec525d1e4d..2e566b263b 100644 --- a/crates/language/src/language.rs +++ b/crates/language/src/language.rs @@ -574,7 +574,7 @@ impl LanguageServerConfig { Self { fake_config: Some(FakeLanguageServerConfig { servers_tx, - capabilities: Default::default(), + capabilities: lsp::LanguageServer::full_capabilities(), initializer: None, }), disk_based_diagnostics_progress_token: Some("fakeServer/check".to_string()), diff --git a/crates/lsp/src/lsp.rs b/crates/lsp/src/lsp.rs index 1a66d2bb5a..3d9df3469c 100644 --- a/crates/lsp/src/lsp.rs +++ b/crates/lsp/src/lsp.rs @@ -512,8 +512,16 @@ type FakeLanguageServerHandlers = Arc< #[cfg(any(test, feature = "test-support"))] impl LanguageServer { + pub fn full_capabilities() -> ServerCapabilities { + ServerCapabilities { + document_highlight_provider: Some(OneOf::Left(true)), + code_action_provider: Some(CodeActionProviderCapability::Simple(true)), + ..Default::default() + } + } + pub fn fake(cx: &mut gpui::MutableAppContext) -> (Arc, FakeLanguageServer) { - Self::fake_with_capabilities(Default::default(), cx) + Self::fake_with_capabilities(Self::full_capabilities(), cx) } pub fn fake_with_capabilities(