rust-lang / rust-lang/rust-analyzer
Format specifier, I want to change the color of the debug symbols
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
In this line:
println!("value of x: {:?} ok?", x);
I wish to change the color of :? or any debug symbol such as :x etc.

Currently you can see that the {:?} is all gray. But when I change it to :x

the x is red.

According to Developer: Inspect Editor Tokens and Scopes the x is a variable

When that is not true, it is a debug symbol.
Whereas :? is a format specifier.

I want to modify the debug symbol to another color. I want to all together modify the : and whatever comes after it such as a ?, x, b etc.
I know I have to put it under "editor.semanticTokenColorCustomizations" and under rules but not sure what is the name of the field?
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
Reproduce the Rust format-string examples from the issue in VS Code and inspect their semantic tokens and scopes. Trace how rust-analyzer classifies :?, :x, :b, and related format specifiers, then add a customizable token classification whose color can be set through semanticTokenColorCustomizations; done means each requested specifier can be styled distinctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, vscode
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100