Include loaded languages when computing lsp workspace configuration
This commit is contained in:
parent
60d3fb48e2
commit
e30ea43a14
1 changed files with 14 additions and 0 deletions
|
@ -133,6 +133,13 @@ impl CachedLspAdapter {
|
||||||
self.adapter.cached_server_binary(container_dir).await
|
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) {
|
pub async fn process_diagnostics(&self, params: &mut lsp::PublishDiagnosticsParams) {
|
||||||
self.adapter.process_diagnostics(params).await
|
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 {
|
cx.background().spawn(async move {
|
||||||
let mut config = serde_json::json!({});
|
let mut config = serde_json::json!({});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue