Giter Club home page Giter Club logo

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 ESLint

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
Webview View Sample N/A window.registerWebviewViewProvider
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 Decorator 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
Color Theme Sample /api/extension-guides/color-theme contributes.themes
Product Icon Theme Sample /api/extension-guides/product-icon-theme contributes.productIconThemes
Vim Sample N/A commands
StatusBarItem
window.createStatusBarItem
TextEditorCursorStyle
window.activeTextEditor
Position
Range
Selection
TextEditor
TextEditorRevealType
TextDocument
webpack-sample N/A
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
Call Hierarchy Sample N/A languages.registerCallHierarchyProvider
CallHierarchyProvider
CallHierarchyItem
CallHierarchyOutgoingCall
CallHierarchyIncomingCall
Custom Editors Sample /api/extension-guides/custom-editors window.registerCustomEditorProvider
CustomTextEditorProvider
contributes.customEditors
Semantic tokens /api/language-extensions/semantic-highlight-guide languages.registerDocumentSemanticTokensProvider
vscode.DocumentSemanticTokensProvider

Language Server Protocol 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.

aetotvl6789's Projects

octicons icon octicons

A scalable set of icons handcrafted with <3 by GitHub

opencollective icon opencollective

We're tracking all our Issues, RFCs and a few other documents in this repository.

opensearch icon opensearch

OpenSearch is a collection of simple formats for the sharing of search results.

opensource.microsoft.com icon opensource.microsoft.com

This is the source code to the Microsoft Open Source site featuring projects, program information, and "get involved" pages. This site is published at opensource.microsoft.com and managed by the Microsoft Open Source Programs Office (OSPO).

orbot icon orbot

The Github home of Orbot: Tor on Android (Also available on gitlab!)

owasp-mstg icon owasp-mstg

The Mobile Security Testing Guide (MSTG) is a comprehensive manual for mobile app security testing and reverse engineering. It describes the technical processes for verifying the controls listed in the OWASP Mobile Application Security Verification Standard (MASVS).

patchwork icon patchwork

Patchwork is a web-based patch tracking system designed to facilitate the contribution and management of contributions to an open-source project.

peps icon peps

Python Enhancement Proposals

php-docs-samples icon php-docs-samples

A collection of samples that demonstrate how to call Google Cloud services from PHP.

php-example-applications icon php-example-applications

Example applications demonstrating to use the WorkOS PHP SDK for SSO, Directory Sync, Admin Portal and Magic Link.

pip icon pip

The Python package installer

pipx icon pipx

Install and Run Python Applications in Isolated Environments

postman-docs icon postman-docs

Documentation for Postman, a collaboration platform for API development. Available for Mac, Windows, and Linux.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.