| 48 | } |
| 49 | |
| 50 | pub async fn collect_document_diagnostics( |
| 51 | command: &str, |
| 52 | args: &[String], |
| 53 | project_root: &Path, |
| 54 | documents: Vec<LspDocument>, |
| 55 | diagnostics_quiet_timeout: Duration, |
| 56 | ) -> Result<Vec<CodeDiagnostic>> { |
| 57 | let timeouts = LspRefreshTimeouts::from_diagnostics_quiet_window(diagnostics_quiet_timeout); |
| 58 | let mut client = |
| 59 | StdioLspClient::start_with_timeouts(command, args, project_root, timeouts).await?; |
| 60 | client |
| 61 | .collect_document_diagnostics(project_root, documents, timeouts) |
| 62 | .await |
| 63 | } |
| 64 | |
| 65 | pub struct StdioLspClient { |
| 66 | command: String, |