Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Sample code illustrating the VS Code extension API.

License

NotificationsYou must be signed in to change notification settings

microsoft/vscode-extension-samples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

This repository contains sample code illustrating the VS Code extension API. Each sample is a self-contained extension that explains one topic inVS Code API or VS Code'sContribution 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 ESLint

Prerequisites

You need to havenode andnpm installed on your system to run the examples. It is recommended to use the node version used for VS Code development itself which is documentedhere

Usage

  • 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

Getting Started

Samples

SampleGuide on VS Code WebsiteAPI & Contribution
Webview Sample/api/extension-guides/webviewwindow.createWebviewPanel
window.registerWebviewPanelSerializer
Webview View SampleN/Awindow.registerWebviewViewProvider
Webview Codicons SampleN/A
Status Bar SampleN/Awindow.createStatusBarItem
StatusBarItem
Tree View Sample/api/extension-guides/tree-viewwindow.createTreeView
window.registerTreeDataProvider
TreeView
TreeDataProvider
contributes.views
contributes.viewsContainers
Task Provider Sample/api/extension-guides/task-providertasks.registerTaskProvider
Task
ShellExecution
contributes.taskDefinitions
Multi Root SampleN/Aworkspace.getWorkspaceFolder
workspace.onDidChangeWorkspaceFolders
Completion Provider SampleN/Alanguages.registerCompletionItemProvider
CompletionItem
SnippetString
Code Actions SampleN/Alanguages.registerCodeActionsProvider
CodeActionProvider
File System Provider SampleN/Aworkspace.registerFileSystemProvider
Editor Decorator SampleN/ATextEditor.setDecorations
DecorationOptions
DecorationInstanceRenderOptions
ThemableDecorationInstanceRenderOptions
window.createTextEditorDecorationType
TextEditorDecorationType
contributes.colors
L10n SampleN/A
Terminal SampleN/Awindow.createTerminal
window.onDidChangeActiveTerminal
window.onDidCloseTerminal
window.onDidOpenTerminal
window.Terminal
window.terminals
Extension Terminal SampleN/Awindow.createTerminal
window.Pseudoterminal
window.ExtensionTerminalOptions
Color Theme Sample/api/extension-guides/color-themecontributes.themes
Product Icon Theme Sample/api/extension-guides/product-icon-themecontributes.productIconThemes
Vim SampleN/Acommands
StatusBarItem
window.createStatusBarItem
TextEditorCursorStyle
window.activeTextEditor
Position
Range
Selection
TextEditor
TextEditorRevealType
TextDocument
webpack-sample/api/working-with-extensions/bundling-extension
esbuild-sample/api/working-with-extensions/bundling-extension
Source Control Sample/api/extension-guides/scm-providerworkspace.workspaceFolders
SourceControl
SourceControlResourceGroup
scm.createSourceControl
TextDocumentContentProvider
contributes.menus
Commenting API SampleN/A
Document Editing SampleN/Acommands
Custom Data Sample/api/extension-guides/custom-data-extension
CodeLens Provider SampleN/Alanguages.registerCodeLensProvider
CodeLensProvider
CodeLens
Call Hierarchy SampleN/Alanguages.registerCallHierarchyProvider
CallHierarchyProvider
CallHierarchyItem
CallHierarchyOutgoingCall
CallHierarchyIncomingCall
Custom Editors Sample/api/extension-guides/custom-editorswindow.registerCustomEditorProvider
CustomTextEditorProvider
contributes.customEditors
Semantic tokens/api/language-extensions/semantic-highlight-guidelanguages.registerDocumentSemanticTokensProvider
vscode.DocumentSemanticTokensProvider
Test Provider SampleN/A
Getting Started SampleN/A
notebook-renderer-sample/api/extension-guides/notebook#notebook-renderercontributes.notebookRenderer
notebook-extend-markdown-renderer-sample/api/extension-guides/notebook#notebook-renderercontributes.notebookRenderer
jupyter-server-provider-sampleN/A
Chat SampleN/A
Chat TutorialN/A
Notifications SampleN/A

Language Server Protocol Samples

SampleGuide on VS Code WebsiteAPI & Contribution
Snippet Sample/api/language-extensions/snippet-guidecontributes.snippets
Language Configuration Sample/api/language-extensions/language-configuration-guidecontributes.languages
LSP Sample/api/language-extensions/language-server-extension-guide
LSP Log Streaming SampleN/A
LSP Multi Root Server Samplehttps://github.com/Microsoft/vscode/wiki/Extension-Authoring:-Adopting-Multi-Root-Workspace-APIs#language-client--language-server
LSP Web Extension Sample/api/language-extensions/language-server-extension-guide
LSP User Input SampleN/A
LSP Embedded Language ServiceN/A
LSP Embedded Request ForwardingN/A
Wasm language serverN/A

License

Copyright (c) Microsoft Corporation. All rights reserved.

Licensed under theMIT License.

About

Sample code illustrating the VS Code extension API.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp