microsoft / microsoft/vscode-cpptools

Semantic colorization should distinguish between declaration and use

Open
#6,013 3 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature: Colorization Language Service Visual Studio
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

  1. Write a function definition that takes parameters in C/C++
  2. Open Inspect Editor Tokens and Scopes
  3. Check the token for the parameter in the function definiton and it's header
  4. See that in the definitions there is no modifier

Example
In this image, in the function definition the parameter doesn't have a modifier
image

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

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

Java example
image

image

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.