Permalink
Fetching contributors…
Cannot retrieve contributors at this time
56 lines (41 sloc) 4.44 KB
Order Area TOCTitle ContentId PageTitle DateApproved MetaDescription
10
extensions
Additional Examples
B32601A8-27ED-4D97-BA83-F1C8C945C635
Visual Studio Code Extension Examples
9/5/2018
Learn from existing Visual Studio Code extension examples.

VS Code Extension Examples

Extension basics

We have two walkthroughs that cover many of the core concepts - start with these:

Sample extensions

Sample Description Type In Marketplace
Word Count Adds a word count to the status bar for Markdown files that updates on editing events. We have a walkthrough on how this was created. Extension Y
MDTools Work with selections and update based on common text processing e.g. ToUpper, HTMLEncode, ... Extension Y
Decorator Shows how to decorate editor text with a border, colors, and a custom cursor as well as add an overview ruler highlight. Extension N
Document Content Provider Shows how to use API commands and how to create virtual documents using the TextDocumentContentProvider-API. Extension Y
TSLint Lint your TypeScript files based on TSLint Language Server Y
Mock Debugger Helps you build and test a debugger. Debuggers Y
Go Language Support Rich language support for Go Lang - IntelliSense, Debug, Peek, Rename, Syntax, ... Extension Y
Tree Data Provider Shows how to use TreeDataProvider API and contribute a custom view to VS Code Extension N

Samples repository

There are many more VS Code extension examples in the VS Code Extension Samples repository. You'll find examples showing best practices and working extensions using the latest APIs.

Documentation

To orient yourself to the VS Code extensibility model, see the following topics:

Tools for building extensions

Tool Purpose
Extension Generator To help you getting started implementing an extension, we have a Yeoman generator. This creates all the initial settings you need for the development environment to work well and includes the API Typing files and any relevant modules. You can find the generator source code here.
Developing Extensions We have worked hard to provide an easy way to develop, debug and locally test your extensions.
Publishing Tool Once you have a working extension, it's time to share it in the extension Marketplace. We have a simple command line tool for this. You can find the source code here.

Next Steps