microsoft / microsoft/vscode-cpptools

Semantic colorization should distinguish between declaration and use

Aperta
#6,013 3 commenti 5 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Feature: Colorization Language Service Visual Studio
Lingua principale
TypeScript
Stelle
6.2k
Fork
1.7k
Merge medio
14h 46m
PR unite (30g)
61

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia nell'area LanguageService dell'estensione C/C++ e riproduci il problema con una definizione di funzione C/C++ e l'uso di un parametro. Ispeziona entrambi i token con VS Code's Inspect Editor Tokens and Scopes; il lavoro è completo quando i parametri nelle definizioni ricevono un modificatore declaration o definition, mentre i loro usi mantengono il token parameter.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
cpp, typescript
Ambito
devtools, tooling
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.