diff --git a/crates/project/src/task_inventory.rs b/crates/project/src/task_inventory.rs index 0e4ca55c99f7e4666ba501499347151d41850a04..b842dd0c09992588bf4a8d71c0c0a150de9ab58e 100644 --- a/crates/project/src/task_inventory.rs +++ b/crates/project/src/task_inventory.rs @@ -369,8 +369,7 @@ impl Inventory { ) { 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(), });