Shows the value of a #define macro or an enum member inline, right after the name, wherever it appears in your C or C++ code. No more jumping to the header just to see what a constant is.
Features
Inline #define values — every use of a macro gets its value rendered in gray next to it, so char buffer[MAX_BUFFER]; reads as MAX_BUFFER 1024.
Inline enum member values — enum entries show their computed number, including implicit counting and hex/binary/octal initializers.
Workspace-wide lookup — definitions are collected from every .c, .C, .cpp, .cxx, .h, .hpp, .hxx file in the workspace (.git, node_modules, dist, out, build, and target are skipped), so a constant defined in one header resolves anywhere.
Duplicate definitions — when a name is defined more than once with different values, the most likely one is shown (a definition in the same file wins, then one in the same folder), followed by a small ! so you know other definitions exist. Identical duplicates show no mark.
Macro-expanded enum members — members that come from a macro used inside an enum body (for example #define PHASES A, B, C, then enum { PHASES }) get their values too, including multi-line macros continued with \.
Comment- and string-aware — text inside comments and string literals is ignored, and long values are shortened to 10 characters with an ellipsis.
Exclusion filters — hide hints for names or values containing patterns you do not care about.
Quick toggle — turn all hints off and on without opening settings.
Hints update automatically as you type and refresh from disk when you save.
Usage
Open a C or C++ file; hints appear on their own. To toggle them, run Toggle Define Enum Hints from the Command Palette (clangDefineEnumHints.toggle) or press Ctrl+Alt+D. Toggling writes the enabled setting to your user settings.
Settings
Setting
Default
Purpose
clangDefineEnumHints.enabled
true
Show or hide all inline hints.
clangDefineEnumHints.excludeDefineNames
[]
Skip hints for macros whose name contains any of these substrings.
clangDefineEnumHints.excludeDefineValues
[]
Skip hints for macros whose value contains any of these substrings.
Files larger than 500 KB are skipped when collecting definitions.