Make path optional when parsing file

Co-Authored-By: Kyle Caverly <kyle@zed.dev>
This commit is contained in:
Antonio Scandurra 2023-09-14 17:09:08 +02:00
parent 24698b61fd
commit 6a271617b4
2 changed files with 22 additions and 8 deletions

View file

@ -402,7 +402,7 @@ impl SemanticIndex {
if let Some(content) = fs.load(&pending_file.absolute_path).await.log_err() {
if let Some(mut spans) = retriever
.parse_file_with_template(&pending_file.relative_path, &content, language)
.parse_file_with_template(Some(&pending_file.relative_path), &content, language)
.log_err()
{
log::trace!(
@ -422,7 +422,7 @@ impl SemanticIndex {
path: pending_file.relative_path,
mtime: pending_file.modified_time,
job_handle: pending_file.job_handle,
spans: spans,
spans,
});
}
}