microsoft / microsoft/vscode-cpptools
IntelliSense: suggest definitions in not-yet-included file
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
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.
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 by locating the IntelliSense completion and include-handling entry points in this repository; the issue names no files or tests. Done means suggestions can find definitions in configured headers not yet included and accepting one adds the relevant include.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100