mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-04-27 16:55:44 +08:00
9177920a1c28e11960e185183d2273af65560a6e
VS Code Extension Samples
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 and Prettier
Samples
| Sample | Guide on VS Code Website | API & Contribution |
|---|---|---|
| Multi Root Sample | N/A | workspace.getWorkspaceFolder workspace.onDidChangeWorkspaceFolders |
| Webview Sample | /api/extension-guides/webview | |
| Status Bar | /api/extension-guides/status-bar | StatusBarItem |
| File System Provider | N/A | workspace.registerFileSystemProvider |
| completions-sample | N/A | |
| configuration-sample | N/A | |
| contentprovider-sample | N/A | |
| decorator-sample | N/A | |
| extension-deps-sample | N/A | |
| hellocode-minimal-sample | N/A | |
| hellocode-sample | N/A | |
| i18n-sample | N/A | |
| legacy-samples | N/A | |
| lsp-log-streaming-sample | N/A | |
| lsp-multi-server-sample | N/A | |
| lsp-sample | N/A | |
| multi-diagnostics-sample | N/A | |
| nodefs-provider-sample | N/A | |
| progress-sample | N/A | |
| quickinput-sample | N/A | |
| smart-template-strings-sample | N/A | |
| task-provider-sample | N/A | |
| terminal-sample | N/A | |
| theme-sample | N/A | |
| tree-view-sample | N/A | |
| vim-sample | N/A | |
| webpack-sample | N/A |
⚠️ Legacy Samples ⚠️
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 |
License
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.
Languages
TypeScript
79%
JavaScript
15.1%
Rust
3.4%
CSS
1.4%
Jupyter Notebook
0.8%
Other
0.2%