Best extension for Cargo.toml support in VS Code

Since I moved from CLion + intellij-rust to VS Code + rust-analyzer, I was very pleased with the experience. Rust-analyzer provides a competitive feature set and it feels mostly feature-complete.

However, my experience is much worse on VS Code when it comes to editing Cargo.toml. Rust-analyzer itself doesn't seem to interact with Cargo.toml at all, and it seems that there is no community-recommended extension for Cargo.toml support. I currently use Even Better TOML and Search, but the auto-completion features are very minimal. I miss a lot of things, for example:

  • Proper crate name auto-completion that works across dependencies/dev-dependencies/build-dependencies and can handle snake case/kebab case conversion.
  • Version auto-completion and an ability to select a version from a list.
  • Feature names auto-completion.
  • An option to turn short dependency syntax (x = "1.0") into long syntax (x = { version = "1.0", features = [...] }) and back.

Is there an extension that does this better?

cargo add is a good alternative, but it's less convenient than IDE support.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.