microsoft / microsoft/vscode-cpptools
IntelliSense: suggest definitions in not-yet-included file
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
Currently (please correct me if I'm wrong), it seems VSCode will not suggest definitions that are not yet included in the source file. This is despite the fact that the definitions reside in header files in includePath. Example below.
For instance, say I wanted to create an instance of std::map in my source file. I have not yet added #include <map> at the top of my source file.
In some other C++ IDEs, a code suggestion will appear for std::map when I start typing it (see NetBeans example below). If I choose to accept the suggestion, #include <map> is automatically added at the top of my source file.

In VSCode, however, I'm not getting this suggestion unless I add #include <map> first.

Suggestion: Enable IntelliSense to suggest definitions that are (not yet) included in the source file.
Automatically add #include (relevant header) when accepting such a suggestion.
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
Beginne damit, die Einstiegspunkte für IntelliSense-Vervollständigungen und die Include-Behandlung in diesem Repository zu finden; im Issue werden keine Dateien oder Tests genannt. Fertig ist die Aufgabe, wenn Vorschläge Definitionen in konfigurierten Headern finden können, die noch nicht eingebunden sind, und die Auswahl eines Vorschlags das relevante Include hinzufügt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- cpp, typescript, vscode
- Bereich
- developer-experience, tooling
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100