fix: lsp: Don't send didOpen events for documents with no URL
Fixes #3683
This commit is contained in:
parent
cc4b71274a
commit
44b447947c
1 changed files with 6 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue