diff --git a/crates/project/src/task_inventory.rs b/crates/project/src/task_inventory.rs index f2ce09a9b4197c11ce3ec5b639b205942022bc3a..fa270f322a621231ebde3036e249d328c03398c7 100644 --- a/crates/project/src/task_inventory.rs +++ b/crates/project/src/task_inventory.rs @@ -412,8 +412,7 @@ impl Inventory { let fs = self.fs.clone(); let worktree = task_contexts.worktree(); let location = task_contexts.location(); - let language = location - .and_then(|location| location.buffer.read(cx).language_at(location.range.start)); + let language = location.and_then(|location| location.buffer.read(cx).language()); let task_source_kind = language.as_ref().map(|language| TaskSourceKind::Language { name: language.name().into(), });