microsoft / microsoft/vscode-cpptools
Emit semantic tokens for user defined conversions
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Feature Request
User defined conversions are the only operator overloads that aren't able to be syntax colored to make them more obvious (aside from new and delete, which I reported recently).
I'd like to request semantic tokens to enable syntax highlighting when a user defined conversion is invoked.

The tricky bit is, which token should it be? On the parentheses? Sometimes there aren't any parenthesis.

Perhaps it should be a modifier on the variable being converted? Can we do that if it's an entire expression? Maybe then we could underline the expression without changing the color of the entire thing.

It would also be nice if "go to definition" worked for the conversion, like other operator overloads. But I don't know if that's feasible.
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 how the extension currently emits semantic tokens and supports go-to-definition for other C++ operator overloads. Compare the reported conversion examples, including cases without parentheses, and determine a token representation that can be applied consistently. Done means the behavior, token choice, and any definition navigation support are specified and covered for the relevant conversion forms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100