rust-lang / rust-lang/rust-analyzer
Code: consider activating the extension lazily
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
We currently set workspaceContains:**/Cargo.toml to have the extension activate if Rust code is present in the workspace, but Code will time out after 5 seconds and activate it anyway.
We could try starting only when editing a Rust file, like vscode-rust did in https://github.com/rust-lang/vscode-rust/commit/61838af.
Thanks to @kankri for the awesome investigation in https://github.com/rust-analyzer/rust-analyzer/issues/2533#issuecomment-622930182, which I've unfortunately missed and to @ishowta who dug it up.
Related #2533
Related #7268
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 by examining the extension activation configuration that uses workspaceContains:**/Cargo.toml, then compare the lazy activation approach in the referenced vscode-rust commit. Confirm how activation behaves when editing a Rust file and verify that the five-second Code timeout no longer causes premature activation; use related issues #2533 and #7268 for context.
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