serayuzgur / crates

crates is an extension aims to help people to manage their dependencies for rust (crates.io & TOML).
https://marketplace.visualstudio.com/items?itemName=serayuzgur.crates
MIT License
238 stars 37 forks source link

[feat] `Cargo.toml` tab-completion enhancement #215

Closed loynoir closed 11 months ago

loynoir commented 11 months ago

Is your feature request related to a problem? Please describe. Better manage Cargo.toml without human typing, just use tab-completion.

Describe the solution you'd like

[dependencies]
foobar = { version = "<Tab></Tab>" }

Currently, the version tab-completion candidate is

  1. ""

  2. "*"

Suggest

  1. search cargo for foobar versions

  2. Use these versions as tab-completion candidate

  3. If there are >=30 versions, and if consider harmful for UI performance, only show the latest of each major version.

[dependencies]
foobar = { version = "1.2.3", features = [<Tab></Tab>] }

Currently, the features element tab-completion candidate is

Suggest

  1. search cargo for foobar@1.2.3 features

  2. Use these features as tab-completion candidate

Describe alternatives you've considered

Additional context

loynoir commented 11 months ago

Mistake.