This repository contains sample code illustrating the VS Code extension API. Each sample is a self-contained extension that explains one topic in VS Code API or VS Code's Contribution Points. You can read, play with or adapt from these samples to create your own extensions.
You can expect from each sample:
- An explanation of its functionality
- A gif or screenshot demonstrating its usage
- Link to a guide on VS Code website, if it has one
- Listing of used VS Code API and Contribution Points
- Code of the same style, enforced using TSLint
git clone https://github.com/Microsoft/vscode-extension-samples
code <any-sample-folder>
npm install
in the terminal, thenF5
to run the sample- Alternatively, follow the instructions in each sample's README for setting up and running the sample
- Hello Code Sample: The Hello World sample for VS Code.
- Hello Code Minimal Sample: A minimal version of Hello Code Sample that doesn't use TypeScript.
🚧 Some links point to our work-in-progress API Extension documentation that is not yet published 🚧
Legacy samples are at /legacy-samples
. They are unlikely to receive any updates and might not work with the latest version of VS Code.
Sample | Deprecated Reason |
---|---|
Preview HTML | Webview API supersedes the old HTML Preview functionality |
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.