rust-lang / rust-lang/rust-analyzer
Meta feature tracking: Language server support for `Cargo.toml` file
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
This issue is an attempt to put all information regarding potential Cargo.toml support in one place.
Blockers
There is no TOML support in RA, and needs a format-preserving parser. toml-edit is maintained along with toml and probably the best choice.
Potential features
- Autocomplete or schema help (reference: https://doc.rust-lang.org/cargo/reference/manifest.html)
- Autocomplete keys
- Suggest valid values for fixed keys like
edition,rust-version,license - Suggest in-workspace files for
license-file,readme,build - Autocomplete dependencies (also handled by the
cratesextension) - Autocomplete dependency features
- Schema validation and warnings/errors, based on the above
- Quick actions & refactoring
- "Move feature to
dev-dependencies/dependencies/build-dependencies" - "Update crate to latest compatible version"
- "Update crate to latest incompatible version"
- Toggle
no-default-features - Refactor simple dependencies to objects and back, like RustRover does https://github.com/rust-lang/rust-analyzer/issues/15741#issuecomment-1761881522
- "Move feature to
- Add crates to
Cargo.tomlfrom a use statement #10904 - Lower priority features that are already well-handled with other ecosystem extensions:
- Link to crates like the
cratesextension: https://github.com/rust-lang/rust-analyzer/issues/13532 - Add syntax highlighting to TOML files #3565. I think the syntax highlighting is not much of a concern since
Even better TOMLdoes it well, but there are some good general suggestions in the issue
- Link to crates like the
See also the label https://github.com/rust-lang/rust-analyzer/labels/S-needs-toml
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
This is a meta-tracking issue rather than a self-contained task. Start by reading the TOML support blocker, the Cargo manifest reference, and the linked issues for crates integration, then choose a single unchecked feature with a defined scope. Done means that one Cargo.toml language-server capability is implemented and its behavior is verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100