rust-lang / rust-lang/rust-analyzer
Add Vs Code commands to toggle `cargo watch` state
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
We should add either
Rust Analyzer: Enable cargo watch and Rust Analyzer: Disable cargo watch
or a single
Rust Analyzer: Toggle cargo watch
Commands are added here: https://github.com/rust-analyzer/rust-analyzer/blob/d5abe4cfddd5c6e14100f20d27d3de38fe7201f5/editors/code/src/main.ts#L15
They also need to be specified in package.json:
I think the command should just toggle the corresponding setting in the workspace file, and that should be, in theory, automatically propagated to the server.
I don't think we have a server-side implementation for this yet, we should add one.
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
Start with the command registration in editors/code/src/main.ts and the command declarations in editors/code/package.json. Trace how the cargo watch workspace setting is propagated to the server, then identify the server-side implementation needed for the command. Done means the VS Code command toggles cargo watch and the server responds to the updated setting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, vscode
- Domain
- developer-experience, devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100