mirror of https://github.com/helix-editor/helix
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
parent
837627dd8a
commit
ba54b6afe4
|
@ -81,6 +81,10 @@ fn request_document_colors(editor: &mut Editor, doc_id: DocumentId) {
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
|
if futures.is_empty() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
let mut all_colors = Vec::new();
|
let mut all_colors = Vec::new();
|
||||||
loop {
|
loop {
|
||||||
|
|
Loading…
Reference in New Issue