diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index 1461c68834fe..9653b3733b59 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -505,8 +505,13 @@ impl Application { let language_id = doc.language_id().map(ToOwned::to_owned).unwrap_or_default(); + let url = match doc.url() { + Some(url) => url, + None => continue, // skip documents with no path + }; + tokio::spawn(language_server.text_document_did_open( - doc.url().unwrap(), + url, doc.version(), doc.text(), language_id,