What are Extensions?
Visual Studio Code extensions allow you to add functionality to the editor, including new languages, debuggers, themes, and tools. VS Code’s extension architecture enables a rich ecosystem while keeping the core editor lightweight and fast. Extensions run in a separate process from the VS Code editor, ensuring that they cannot slow down or crash the main application.Extension Capabilities
Extensions can enhance VS Code in many ways:Language Support
Add syntax highlighting, IntelliSense, code completion, and language-specific features
Themes
Customize the editor’s appearance with color themes and icon themes
Debuggers
Integrate debugging support for different languages and runtimes
Source Control
Add version control providers and enhance Git workflows
Commands & UI
Register custom commands, menus, keybindings, and UI components
Webviews
Create custom views using HTML, CSS, and JavaScript
Built-in Extensions
VS Code ships with over 100 built-in extensions that provide core functionality. These extensions are located in theextensions/ directory of the VS Code source code.
Language Extensions
TypeScript/JavaScript
The
typescript-language-features extension provides IntelliSense, code navigation, refactoring, and formatting for TypeScript and JavaScript.Markdown
The
markdown-language-features extension offers preview, syntax highlighting, and validation for Markdown files.JSON
The
json-language-features extension provides schema validation, IntelliSense, and formatting for JSON files.HTML/CSS
The
html-language-features and css-language-features extensions support web development with completion and validation.Tool Extensions
Git - Thegit extension provides comprehensive source control integration:
- View and stage changes
- Commit and push/pull
- Branch management
- Merge conflict resolution
- Git history and timeline
emmet extension enables rapid HTML and CSS development:
- Abbreviation expansion
- Tag manipulation
- Math expression evaluation
- Custom snippets
extension-editing extension helps develop VS Code extensions:
- Package.json schema validation
- Language configuration schemas
- Theme schema validation
Extension Manifest
Every extension must have apackage.json file at its root. This manifest file describes the extension and defines its capabilities.
Key Manifest Properties
- name - Unique identifier for the extension (lowercase, no spaces)
- displayName - Human-readable name shown in the marketplace
- version - Extension version following semver
- engines.vscode - Minimum VS Code version required
- categories - Categories for marketplace classification
- activationEvents - When the extension should be activated
- main - Entry point file for the extension
- contributes - Declarative contributions to VS Code
Extension Categories
Extensions are organized into categories in the marketplace:- Programming Languages - Language support extensions
- Snippets - Code snippet collections
- Linters - Code quality and style checkers
- Debuggers - Debugging support
- Formatters - Code formatting tools
- Themes - Color and icon themes
- Other - General-purpose extensions
Extension Activation
Extensions are lazy-loaded and activate only when needed. Activation events determine when an extension starts:Use specific activation events rather than
* to ensure your extension only loads when necessary, improving startup performance.Extension API
Extensions interact with VS Code through the Extension API, defined invscode.d.ts. This API provides:
- Commands - Register and execute commands
- Window - Interact with the editor window
- Workspace - Access files and folders
- Languages - Register language providers
- Debug - Implement debugger support
- SCM - Integrate source control
- Tasks - Define and run tasks
Web Extensions
VS Code supports extensions that run in the browser (vscode.dev, github.dev). Web extensions have some differences:- Must use browser-compatible APIs only
- Cannot use Node.js modules
- Require a separate browser entrypoint
- Must declare
"browser"field in package.json
Virtual Workspaces
Extensions can declare support for virtual workspaces (remote or virtual file systems):Next Steps
Browse Extensions
Learn how to find and install extensions from the marketplace
Create Extensions
Build your first VS Code extension
Publish Extensions
Share your extension with the world