Skip to content

Commit 44b4479

Browse files
committed
fix: lsp: Don't send didOpen events for documents with no URL
Fixes #3683
1 parent cc4b712 commit 44b4479

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

helix-term/src/application.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,8 +505,13 @@ impl Application {
505505
let language_id =
506506
doc.language_id().map(ToOwned::to_owned).unwrap_or_default();
507507

508+
let url = match doc.url() {
509+
Some(url) => url,
510+
None => continue, // skip documents with no path
511+
};
512+
508513
tokio::spawn(language_server.text_document_did_open(
509-
doc.url().unwrap(),
514+
url,
510515
doc.version(),
511516
doc.text(),
512517
language_id,

0 commit comments

Comments
 (0)