rust-lang / rust-lang/rust-analyzer

Feature request: distinguish mut keyword in semantic highlighting

Open
#12,561 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

The mut keyword does not have any semantic modifiers to distinguish it from other keywords under semantic highlighting.

A semantic modifier (e.g., mutable) could be added to the mut keyword. This way, a different style for the mut keyword could be specified in user settings.json.

(This is possible with semantic highlighting disabled and using the textmate scope storage.modifier.mut.rust. However, semantic highlighting enabled overrides the textmate scope.)

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

No file, test, or entry point is named. Start by tracing rust-analyzer's semantic highlighting handling for the Rust mut keyword and comparing existing semantic modifiers; done means mut has a distinct modifier that users can target with a separate style in settings.json.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.