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.

Preview
Screenshots taken with Dark 2026 (built-in theme)
| Without Extension |
With Extension |
 |
 |
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:
- Open a
.cfg file
- Click the language indicator in the bottom-right corner
- Select Configure File Association for '.cfg'...
- Search and select CS2 Config
Alternatively, add this to your user settings (Ctrl+,):

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