Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>clang extern variable highlightNew to Visual Studio Code? Get it now.
clang extern variable highlight

clang extern variable highlight

noname

|
46 installs
| (0) | Free
clang extern variable highlight
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Clang Extern Variable Highlight

A Visual Studio Code extension that highlights extern variable references across your C/C++ project, making it easier to identify and track extern variable usage.

Features

  • Automatically highlights extern variable references in your code
  • Cross-project reference support:
    • Detects extern declarations across multiple files in your workspace
    • Processes files recursively up to 5 directory levels deep
  • Smart detection:
    • Ignores variables within comments
    • Processes files up to 500KB in size
    • Handles up to 100 files per workspace
  • Customizable highlighting:
    • Configure highlight color
    • Configure background color
  • Easy toggle on/off functionality

Usage

  1. Open a C or C++ file in your workspace
  2. Extern variable references will automatically be highlighted
  3. Use keyboard shortcuts to toggle highlighting

Toggle Highlighting

  • ctrl+alt+v: Toggle highlighting

Examples

Extern Variable Usage

// In header file
extern int globalCounter;
extern const char* configPath;

// In source file
void someFunction() {
    // 'globalCounter' and 'configPath' will be highlighted
    globalCounter++;
    printf("Config: %s\n", configPath);
}

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:

  • clangExternVariableHighlight.enabled: Enable/disable highlighting (default: true)
  • clangExternVariableHighlight.highlightColor: Color for highlighting extern variables (default: "#73D1D6")
  • clangExternVariableHighlight.backgroundColor: Background color for highlighting extern variables (default: "inherit")

Known Limitations

  • Processes only the first 100 files in the workspace
  • Maximum file size limit of 500KB
  • Limited to 5 directory levels deep for file scanning
  • Basic parsing may not handle complex extern declarations with multiple pointers or array declarations
  • Performance may be affected in large workspaces with many files

Release Notes

1.0.0

  • Initial release
  • Basic extern variable highlighting
  • Customizable colors
  • Toggle support
  • Multi-file workspace support

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