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
Fixes #3683
  • Loading branch information
archseer committed Sep 4, 2022
1 parent cc4b712 commit 44b4479
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 44b4479

Please sign in to comment.