Filter un-initialized language servers

This commit is contained in:
Sofus Addington 2025-03-12 11:07:13 +01:00
parent a9c2953001
commit e54021fe0a
No known key found for this signature in database
GPG key ID: 57579341E1199840

View file

@ -114,6 +114,7 @@ fn dispatch_pull_diagnostic_for_document(
let language_servers = doc
.language_servers_with_feature(LanguageServerFeature::PullDiagnostics)
.filter(|ls| ls.is_initialized())
.filter(|ls| {
if !exclude_language_servers_without_inter_file_dependency {
return true;
@ -142,8 +143,9 @@ fn dispatch_pull_diagnostic_for_open_documents() {
let documents = editor.documents.values();
for document in documents {
let language_servers =
document.language_servers_with_feature(LanguageServerFeature::PullDiagnostics);
let language_servers = document
.language_servers_with_feature(LanguageServerFeature::PullDiagnostics)
.filter(|ls| ls.is_initialized());
for language_server in language_servers {
pull_diagnostics_for_document(document, language_server);