microsoft / microsoft/vscode-cpptools
Semantic colorization should distinguish between declaration and use
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Type: LanguageService
- OS and Version: Linux 5.9.X
- VS Code Version: 1.48.0
- C/C++ Extension Version: 0.30.0-insiders3
- Other extensions you installed (and if the issue persists after disabling them): None related to C/C++
- Does this issue involve using SSH remote to run the extension on a remote machine?: No
I got myself wanting in my theme to give a color only to the parameter definition of functions while it's usage continuing to be colored the same way as any variable. I could my wanted results with Rust, Java and TypeScript because in the functions definitions the parameters receive a modifiers (definition/decleration or something similar)
Steps to reproduce
- Write a function definition that takes parameters in C/C++
- Open
Inspect Editor Tokens and Scopes - Check the token for the parameter in the function definiton and it's header
- See that in the definitions there is no modifier
Example
In this image, in the function definition the parameter doesn't have a modifier

This image show the usage. Here it's "correct", only parameter, without modifier

Expected behavior
The parameter in the function definition having a modifier.
Java example


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 in the LanguageService area of the C/C++ extension and reproduce the issue with a C/C++ function definition and parameter use. Inspect both tokens with VS Code's Inspect Editor Tokens and Scopes; done means parameters in definitions receive a declaration or definition modifier while their uses retain the parameter token.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, typescript
- Domain
- devtools, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100