LSP: Short-circuit documentColors request for no servers

This fixes a deadlock when starting Helix with very many files, like
`hx runtime/queries/*/*.scm`. The tree-sitter query files don't have
an active language server on my machine and yet we were spawning a tokio
task to collect documentColors responses. We can skip that entirely.
Further debugging is needed to figure out why this lead to a deadlock
previously.
pull/13617/merge
Michael Davis 2025-06-16 09:37:14 -04:00
parent 837627dd8a
commit ba54b6afe4
No known key found for this signature in database
1 changed files with 4 additions and 0 deletions

View File

@ -81,6 +81,10 @@ fn request_document_colors(editor: &mut Editor, doc_id: DocumentId) {
})
.collect();
if futures.is_empty() {
return;
}
tokio::spawn(async move {
let mut all_colors = Vec::new();
loop {