Suggestion - quick action to expand dependency specification in Cargo.toml
See original GitHub issueWhen adding dependencies to my Cargo.toml
, it’s handy that the latest version is provided as a completion. However, it’s still a bit annoying to type out the dependency specifications when the dependency needs to be configured with additional options, like default_features = false
or features = [ "serde" ]
. It would be handy to have an action that expands the shorter syntax to the full syntax, placing the cursor before the closing bracket so additional options can be added - replacing serde = "1.0"
with serde = { version = "1.0" }
Intentions
- Expand key-value specification into inline table (#6960)
- Extract inline table to separate table (#7003)
- Move separate dependency table into inline table
- Simplify separate table/inline table into key-value if there is only
version
key (#7559)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:8 (5 by maintainers)
Top Results From Across the Web
The Manifest Format - The Cargo Book
The Cargo.toml file for each package is called its manifest. Every manifest file consists of one or more sections. The [package] section.
Read more >Specifying Dependencies - The Cargo Book
To specify a dependency from a registry other than crates.io, first the registry must be configured in a .cargo/config.toml file.
Read more >What's New in IntelliJ Rust for the 2021.2 Release Cycle
There is a new intention action that expands dependency specifications in Cargo.toml, either inline or into a separate table below the current ...
Read more >IntelliJ Rust Changelog #152
This intention action simplifies the writing of trait impl s. ... #7559 Simplify dependency specification for dependencies in Cargo.toml.
Read more >Use feature of crate dependency without its declaration in toml
Does this answer your question? How do I 'pass down' feature flags to subdependencies in Cargo? · I don't think so. · It...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Kobzol actually, I already have a prototype of this feature so I don’t think we should make it twice I’ll try to finish it soon
It might be nice to be able to cycle through the three (only?) main ways of representing them: