1 Star 0 Fork 0

foresightyj / vscode-extension-samples

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

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

Prerequisites

You need to have node and npm installed on your system to run the examples. It is recommended to use the node version used for VS Code development itself which is documented here

Usage

  • git clone https://github.com/Microsoft/vscode-extension-samples
  • code <any-sample-folder>
  • npm install in the terminal, then F5 to run the sample
  • Alternatively, follow the instructions in each sample's README for setting up and running the sample

Getting Started

Samples

Sample Guide on VS Code Website API & Contribution
Webview Sample /api/extension-guides/webview window.createWebviewPanel
window.registerWebviewPanelSerializer
Status Bar Sample N/A window.createStatusBarItem
StatusBarItem
Tree View Sample /api/extension-guides/tree-view window.createTreeView
window.registerTreeDataProvider
TreeView
TreeDataProvider
contributes.views
contributes.viewsContainers
Task Provider Sample /api/extension-guides/task-provider tasks.registerTaskProvider
Task
ShellExecution
contributes.taskDefinitions
Multi Root Sample N/A workspace.getWorkspaceFolder
workspace.onDidChangeWorkspaceFolders
Completion Provider Sample N/A languages.registerCompletionItemProvider
CompletionItem
SnippetString
Code Actions Sample N/A languages.registerCodeActionsProvider
CodeActionProvider
File System Provider Sample N/A workspace.registerFileSystemProvider
Editor Decoractor Sample N/A TextEditor.setDecorations
DecorationOptions
DecorationInstanceRenderOptions
ThemableDecorationInstanceRenderOptions
window.createTextEditorDecorationType
TextEditorDecorationType
contributes.colors
I18n Sample N/A
Terminal Sample N/A window.createTerminal
window.onDidChangeActiveTerminal
window.onDidCloseTerminal
window.onDidOpenTerminal
window.Terminal
window.terminals
Extension Terminal Sample N/A window.createTerminal
window.Pseudoterminal
window.ExtensionTerminalOptions
Vim Sample N/A commands
StatusBarItem
window.createStatusBarItem
TextEditorCursorStyle
window.activeTextEditor
Position
Range
Selection
TextEditor
TextEditorRevealType
TextDocument
Source Control Sample /api/extension-guides/scm-provider workspace.workspaceFolders
SourceControl
SourceControlResourceGroup
scm.createSourceControl
TextDocumentContentProvider
contributes.menus
Commenting API Sample N/A
Document Editing Sample N/A commands
Custom Data Sample /api/extension-guides/custom-data-extension
CodeLens Provider Sample N/A languages.registerCodeLensProvider
CodeLensProvider
CodeLens

Language Protocol Server Samples

Sample Guide on VS Code Website API & Contribution
Snippet Sample /api/language-extensions/snippet-guide contributes.snippets
Language Configuration Sample /api/language-extensions/language-configuration-guide contributes.languages
LSP Sample /api/language-extensions/language-server-extension-guide
LSP Log Streaming Sample N/A
LSP Multi Root Server Sample https://github.com/Microsoft/vscode/wiki/Extension-Authoring:-Adopting-Multi-Root-Workspace-APIs#language-client--language-server

License

Copyright (c) Microsoft Corporation. All rights reserved.

Licensed under the MIT License.

空文件

简介

Sample code illustrating the VS Code extension API. 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/fht_foresightyj/vscode-extension-samples.git
git@gitee.com:fht_foresightyj/vscode-extension-samples.git
fht_foresightyj
vscode-extension-samples
vscode-extension-samples
master

搜索帮助