Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>CS2 Config SyntaxNew to Visual Studio Code? Get it now.
CS2 Config Syntax

CS2 Config Syntax

Mario Morales Ortega

|
31 installs
| (1) | Free
Syntax highlighting for CS2 .cfg files
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CS2 Config Syntax for Visual Studio Code

Makes Counter-Strike 2 .cfg files clear and visually organized with comprehensive color-coded syntax highlighting. Recognizes all console commands and variables (ConVars) as of October 25, 2025.
Also compatible with Counter-Strike: Global Offensive .cfg files.

Features

Screenshots taken with Catppuccin for VSCode v3.18.1 & CS2 Config Syntax v0.3.0

Extension Off Extension On
extensionOff extensionOn

Makes CS2 config files easier to read and edit with color coding for:

  • ConVars: All current console commands and variables as of October 25, 2025 (e.g., sensitivity, cl_crosshair, mp_roundtime, exec, echo)
  • Aliases: Custom alias definitions with highlighted names
  • Keybinds: All keys, mouse buttons, and scancodes
  • Maps & Weapons: Map names (de_dust2, cs_italy) and weapon identifiers
  • Network: IPv4 addresses and hostnames with ports
  • Values: Numbers, booleans, and strings
  • Comments: Line comments starting with //

Known Issues

  • Some regex patterns are intentionally broad (e.g., r_) and may match more identifiers than intended.

Setup

The extension should activate automatically. If it doesn’t, follow these steps:

  • Open a .cfg file
  • Click the bottom-right corner to Select Language Mode
  • Select: Configure File Association for '.cfg'... and search CS2 Config

Or open your user settings (Ctrl+,) and add the configuration manually:

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