Skip to content

Commit

Permalink
fix: lsp: Don't send didOpen events for documents with no URL
Browse files Browse the repository at this point in the history
  • Loading branch information
archseer authored and thomasskk committed Sep 9, 2022
1 parent 86cedbf commit 4330ab6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion helix-term/src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4330ab6

Please sign in to comment.