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

|
117 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

Colors every reference to an extern variable in your C and C++ code, so a glance tells you which names come from another translation unit.

Features

  • Automatic highlighting of extern references — any identifier declared somewhere as extern is tinted wherever it is used, not just at its declaration.
  • Workspace-wide declaration scan — declarations are gathered from all .c, .C, .cpp, .cxx, .h, .hpp, .hxx files in the workspace (.git, node_modules, dist, out, build, and target are skipped), so a header's extern int counter; lights up its uses in every source file.
  • Comment- and string-aware — occurrences inside comments and string literals are left alone, so you only see real references.
  • Your colors — set the foreground tint and the background independently to match your theme.
  • Quick toggle — switch highlighting off and on without opening settings.

Highlights refresh as you type and re-scan the workspace when you save.

Usage

Open a C or C++ file; highlighting applies automatically. To toggle it, run Toggle Extern Variable Highlight from the Command Palette (clangExternVariableHighlight.toggle) or press Ctrl+Alt+V. Toggling writes the enabled setting to your user settings.

Settings

Setting Default Purpose
clangExternVariableHighlight.enabled true Turn highlighting on or off.
clangExternVariableHighlight.highlightColor #73D1D6 Text color used for extern references.
clangExternVariableHighlight.backgroundColor inherit Background color behind extern references.

Files larger than 500 KB are skipped when scanning for declarations. Detection matches plain declarations such as extern int x;, extern const unsigned counter; and array forms like extern int table[10];. Pointer declarations and other more elaborate forms are not recognized.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft