aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--helix-term/src/application.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs
index 1461c688..9653b373 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,