GithubHelp home page GithubHelp 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

community-1 icon community-1

This repository holds the content submitted to https://cloud.google.com/community. Files added to the tutorials/ directory will appear at https://cloud.google.com/community/tutorials.

community-2 icon community-2

Public feedback discussions for: GitHub Mobile, GitHub Discussions, GitHub Codespaces, GitHub Sponsors, GitHub Issues and more!

conda icon conda

OS-agnostic, system-level binary package manager and ecosystem

core icon core

Home repository for .NET Core

dataquatic icon dataquatic

An autonomous aquatic vehicle to facilitate sampling stage in a field of shrimp and various marine animals, by analyzed information from the fields

datatracker icon datatracker

The day-to-day front-end to the IETF database for people who work on IETF standards.

dawg icon dawg

DAFSA-based dictionary-like read-only objects for Python. Based on `dawgdic` C++ library.

desktop icon desktop

Simple collaboration from your desktop

docs-1 icon docs-1

This repository contains .NET Documentation.

docs-4 icon docs-4

An open source project for Gogs documentation.

docs-6 icon docs-6

ARCHIVED - This repo hosts the docs site for the Protocol Guild

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.