microsoft / microsoft/vscode-cpptools
Intellisense for C++: Values for enum variables/arguments prediction
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 6.2k
- Forks
- 1.7k
- Ø Merge
- 14 Std. 46 Min.
- Gemergte PRs (30 T.)
- 61
Beschreibung
Type: LanguageService
Describe the bug
- OS and Version: Windows 10 x64
- VS Code Version: 1.47.2
- C/C++ Extension Version: 0.29.0
- Other extensions you installed (and if the issue persists after disabling them): platformio
I'd like to propose improvement to how does IntelliSense operate on enums.
Currently if you have code like following and you press Ctrl+Space inside parentheses of the foo function call, IntelliSense returns huge list of unrelated items like: pre-processor derictives, integer constants, functions. See screenshot attached.
All 99% of the suggested items are not compatible with enum. They cannot be implicitly converted to enum.
Steps to reproduce
//
// Code example
//
enum SomeEnums
{
Element1,
Element2
};
int main()
{
SomeEnums SomeEnum;
SomeEnum = /* press Ctrl+Space here */
return 0;
}
Screenshots
The screenshots show the work of another IDE in this situation - the first to offer compatible options


Additional context
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Es wird keine Quelldatei, kein Test und kein Einstiegspunkt genannt. Beginne damit, das Beispiel für die enum-Zuweisung in VS Code mit der C/C++-Erweiterung nachzustellen, und untersuche den IntelliSense-Vervollständigungspfad. Als erledigt gilt die Aufgabe, wenn Ctrl+Space enum-kompatible Werte statt der großen Menge irrelevanter Vorschläge anzeigt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- cpp
- Bereich
- developer-experience, tooling
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100