diff options
author | Blaž Hrastnik | 2022-09-04 08:28:17 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2022-09-04 08:28:17 +0000 |
commit | 44b447947c810b7fc6a13383b4379f0f48501c17 (patch) | |
tree | e6c730665b3bf5bf959ccef2abf3343bf718faea /helix-term/src | |
parent | cc4b71274a9fbffe4081243b19f2234ed6492fb3 (diff) |
fix: lsp: Don't send didOpen events for documents with no URL
Fixes #3683
Diffstat (limited to 'helix-term/src')
-rw-r--r-- | helix-term/src/application.rs | 7 |
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, |