rust-lang / rust-lang/rust-analyzer

Highlighting of the insides of cfg_select!

Open
#22,294 15 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

A-highlighting A-macro C-feature
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

cfg_select! has become widely available and I wish it would be handled in a way resembling previously existing concepts:

  • inactive sections should get inactive-code and dimmed, like with the #[cfg(..)] equivalent
  • the => should not be regarded as separate = >, like with the match equivalent
Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the syntax-highlighting handling for cfg_select! and compare it with the existing #[cfg(..)] and match handling. Verify that inactive sections receive inactive-code styling and that => is highlighted as a single construct; add or update coverage for both cases if the surrounding tests support it.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.