microsoft / microsoft/vscode-cpptools
Intellisense for C++: Values for enum variables/arguments prediction
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
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
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
No source file, test, or entry point is named. Start by reproducing the enum assignment example in VS Code with the C/C++ extension and inspect the IntelliSense completion path. Done means Ctrl+Space presents enum-compatible values instead of the large set of unrelated suggestions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100