Change summary
crates/language/src/language.rs | 14 ++++++++++++++
1 file changed, 14 insertions(+)
Detailed changes
@@ -133,6 +133,13 @@ impl CachedLspAdapter {
self.adapter.cached_server_binary(container_dir).await
}
+ pub fn workspace_configuration(
+ &self,
+ cx: &mut MutableAppContext,
+ ) -> Option<BoxFuture<'static, Value>> {
+ self.adapter.workspace_configuration(cx)
+ }
+
pub async fn process_diagnostics(&self, params: &mut lsp::PublishDiagnosticsParams) {
self.adapter.process_diagnostics(params).await
}
@@ -557,6 +564,13 @@ impl LanguageRegistry {
}
}
}
+ for language in self.languages.read().iter() {
+ if let Some(adapter) = language.lsp_adapter() {
+ if let Some(language_config) = adapter.workspace_configuration(cx) {
+ language_configs.push(language_config);
+ }
+ }
+ }
cx.background().spawn(async move {
let mut config = serde_json::json!({});