-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat: Autocomplete Cargo-defined env vars in env!
and option_env!
(#12448)
#13358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Autocomplete Cargo-defined env vars in env!
and option_env!
(#12448)
#13358
Conversation
if !matches!(name.text().as_str(), "env" | "option_env") { | ||
return None; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A possible follow up is to check that the macro is build-in, to guard against shadowing. Something like #13356
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, thanks! Will add that check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
Thanks! |
☀️ Test successful - checks-actions |
env-completions.mp4 |
Closes #12448
Important to know:
CARGO_BIN_EXE_<name>
andOUT_DIR
since it would require information about build.rs and binary name. If somebody knows an easy way of obtaining them I can add those vars as well :)