rust-lang / rust-lang/rust-analyzer
Feature Request: Produce fewer semantic tokens if the client uses augmentsSyntaxTokens
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
rust-analyzer produces a lot of semantic tokens, including those for simple syntax features such as parentheses and semicolons. Most other LSP servers do not produce such a large set of tokens and so perform better than rust-analyzer for me when semantic tokens are enabled.
I believe the intended use of the augmentsSyntaxTokens client capability is to indicate to the server that these simple tokens which do not require semantic analysis will be highlighted independently by the client and do not need to be provided by the server.
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 with the linked LSP specification for the augmentsSyntaxTokens client capability, then trace rust-analyzer's semantic-token generation and client-capability handling. Done means clients declaring this capability receive fewer simple syntax tokens while other clients retain current semantic-token behavior; the issue names no repository files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100