task: Add ZED_PACKAGE task variable in Rust files. (#9491)
This variable is experimental, as I expect it to be superseded by whatever the extensions can provide (once we get them) Release Notes: - Added experimental ZED_PACKAGE task variable which contains name of the current crate in Rust files. --------- Co-authored-by: Kirill <kirill@zed.dev>
This commit is contained in:
parent
a69eddc081
commit
07dbee8651
3 changed files with 53 additions and 2 deletions
|
@ -171,6 +171,9 @@ fn task_context(
|
|||
if let Some(symbol) = language_context.symbol {
|
||||
env.insert("ZED_SYMBOL".into(), symbol);
|
||||
}
|
||||
if let Some(symbol) = language_context.package {
|
||||
env.insert("ZED_PACKAGE".into(), symbol);
|
||||
}
|
||||
}
|
||||
|
||||
Some(TaskContext {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue