Skip to content

IntelliSense: suggest definitions in not-yet-included file #4776

@birgersp

Description

@birgersp

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.

image

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

image

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions