Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>clang define enum hintsNew to Visual Studio Code? Get it now.
clang define enum hints

clang define enum hints

noname

|
51 installs
| (0) | Free
clang define enum hints
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Clang Define Enum Hints

A Visual Studio Code extension that provides inline hints for C and C++ preprocessor macro definitions (#define) and enum values across your project.

Features

  • Automatically detects and displays inline hints for:
    • #define macros values in gray
    • Enum member values in gray
  • Cross-project reference support:
    • Collects definitions from multiple files in your workspace
    • Highlights duplicate definitions with a red '×' indicator
  • Smart detection:
    • Ignores values within comments
    • Truncates long values (>10 characters) with ellipsis
    • Processes files up to 500KB in size
    • Handles up to 100 files per workspace
  • Easy toggle on/off functionality

Usage

  1. Open a C or C++ file in your workspace
  2. Inline hints will automatically appear next to macro and enum member usages
  3. Use keyboard shortcuts to toggle hints

Toggle Hints

  • ctrl+alt+d: Toggle hints

Examples

Define Examples

#define MAX_BUFFER 1024
#define SERVER_PORT 8080

void someFunction() {
    // MAX_BUFFER will show "1024" in gray
    char buffer[MAX_BUFFER];
    // SERVER_PORT will show "8080" in gray
    connectToPort(SERVER_PORT);
}

Enum Examples

enum Color {
    RED = 0,
    GREEN = 1,
    BLUE = 2
};

void setColor() {
    // RED will show "0" in gray
    // GREEN will show "1" in gray
    Color colors[] = { RED, GREEN };
}

Supported File Types

The extension supports the following file extensions:

  • .c
  • .cpp
  • .h
  • .hpp
  • .cxx
  • .hxx

Requirements

  • Visual Studio Code version 1.96.0 or higher

Extension Settings

This extension contributes the following settings:

  • clangDefineEnumHints.enabled: Enable/disable all hints (default: true)

Known Limitations

  • Processes only the first 100 files in the workspace
  • Maximum file size limit of 500KB
  • Values longer than 10 characters are truncated with ellipsis
  • Basic parsing may not handle complex macro definitions
  • Anonymous enums are labeled as "Anonymous"

Release Notes

0.0.1

  • Initial release
  • Basic #define and enum hint functionality
  • Duplicate definition detection
  • Toggle support for all hints

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This extension is licensed under the MIT License.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft