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

CS2 Config Support

Mario Ortega

|
196 installs
| (1) | Free
Syntax highlighting & IntelliSense 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 Support for Visual Studio Code

Syntax highlighting and IntelliSense for Counter-Strike 2 .cfg files. Recognizes all ConVars & ConCommands (hopefully) as of CS2 Build 25640462.

Partial backward compatibility with CS:GO .cfg files.

Version Installs Rating

Preview

Screenshots taken with Dark 2026 (built-in theme)

Without Extension With Extension
CS2 config file without syntax highlighting CS2 config file with syntax highlighting enabled

Features

Syntax Highlighting

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

IntelliSense

  • Autocompletion: All ConVars and Commands with type hints
  • Hover information: Displays command name, default value, flags, and description for any command

Installation

Search CS2 Config Support in the VS Code Extensions panel (Ctrl+Shift+X) or install directly from the Visual Studio Marketplace.

Setup

The extension activates automatically when you open a .cfg file. If it doesn't:

  1. Open a .cfg file
  2. Click the language indicator in the bottom-right corner
  3. Select Configure File Association for '.cfg'...
  4. Search and select CS2 Config

Alternatively, add this to your user settings (Ctrl+,):

VS Code settings.json showing the file association configuration for .cfg files

Known Issues

  • Some regex patterns are intentionally broad (e.g., r_) and may match more identifiers than intended.
  • Most commands lack metadata (default value, flags, description) due to the sheer number of ConVars and ConCommands in CS2. Contributions are welcome.

Changelog

See CHANGELOG.md for version history and updates.

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