rust-lang / rust-lang/rust-analyzer
Improved CFG experience
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
Currently working with #[cfg(...)]'ed code in r-a is not a nice experience, it's difficult to switch between them (or in part just impossible currently) and otherwise annoying, with semantic highlighting for example unconfigured code just turns into a bunch of random colors due to not having semantic information.
We should be able to do better here, the question is to what degree! Here a bunch of issues that are related to that experience (there are more smaller IDE related issues aside from the listed ones)
- https://github.com/rust-lang/rust-analyzer/issues/16191
- https://github.com/rust-lang/rust-analyzer/issues/16122
- https://github.com/rust-lang/rust-analyzer/issues/15352
- https://github.com/rust-lang/rust-analyzer/issues/12462
- https://github.com/rust-lang/rust-analyzer/issues/5421
- https://github.com/rust-lang/rust-analyzer/issues/12059
- https://github.com/rust-lang/rust-analyzer/issues/6117
- https://github.com/rust-lang/rust-analyzer/issues/4041
- https://github.com/rust-lang/rust-analyzer/discussions/16345
It mainly boils down to two core issues,
- being able to switch between configurations dynamically without fiddling with settings and having to restart the server, and
- Giving a better user experience for unconfigured code
The former seems like simpler issue to solve, it mainly requires some UX design and integration part, the second on the other hand is more tricky and needs some architecture thinking.
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 reviewing the linked issues and discussion, then separate the configuration-switching UX from the unconfigured-code experience. The issue names no files or tests; completion would require an agreed design and implementation plan for dynamic configuration switching and better handling of unconfigured code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100