We recommend using Visual Studio 2017

Extending the Editor and Language Services

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Extending the Editor and Language Services.

You can add language service features (such as IntelliSense) to your own editor, and extend most features of the Visual Studio code editor. For a full list of what you can extend, see Language Service and Editor Extension Points.

You extend most editor features by using the Managed Extensibility Framework (MEF). For example, if the editor feature you want to extend is syntax coloring, you can write a MEF component part that defines the classifications for which you want different coloring and how you want them handled. The editor also supports multiple extensions of the same feature.

The editor presentation layer is based the Windows Presentation Framework (WPF). WPF provides a graphics library for flexible text formatting, and also provides visualizations such as graphics and animations.

The Visual Studio SDK provides adapters known as shims to support VSPackages that were written for earlier versions. Nevertheless, if you have an existing VSPackage, we recommend that you update it to the new technology to obtain better performance and reliability.

TitleDescription
Getting Started with Language Service and Editor ExtensionsExplains how to create an extension to the editor.
Inside the EditorDescribes the general structure of the editor, and lists some of its features.
Managed Extensibility Framework in the EditorExplains how to use the Managed Extensibility Framework (MEF) with the editor.
Language Service and Editor Extension PointsLists the extension points of the editor. Extension points represent the editor features that can be extended.
Walkthrough: Creating a View Adornment, Commands, and Settings (Column Guides)Walks through and explains building a view adornment that draws column gudie lines to help you keep code to a certain display width. Also shows reading and writing settings as well as declaring and implementing commands that you can invoke from the Command Window.
Editor ImportsLists the services that an extension can import.
Adapting Legacy Code to the EditorExplains different ways to adapt legacy code (pre-Visual Studio 2010) to extend the editor.
Migrating a Legacy Language ServiceExplains how to migrate a VSPackage based language service.
Walkthrough: Linking a Content Type to a File Name ExtensionShows how to link a content type to a file name extension.
Walkthrough: Creating a Margin GlyphShows how to add an icon to a margin.
Walkthrough: Highlighting TextShows how to use tags to highlight text.
Walkthrough: OutliningShows how to add outlining for specific kinds of braces.
Walkthrough: Displaying Matching BracesShows how to highlight matching braces.
Walkthrough: Displaying QuickInfo TooltipsShows how to display QuickInfo popups that describe elements of code such as properties, methods, and events.
Walkthrough: Displaying Signature HelpShows how to display popups that give information about the number and types of parameters in a signature.
Walkthrough: Displaying Statement CompletionShows how to implement statement completion.
Walkthrough: Implementing Code SnippetsShows how to implement code-snippet expansion.
Walkthrough: Displaying Light Bulb SuggestionsShows how to display light bulbs for code suggestions.
Walkthrough: Using a Shell Command with an Editor ExtensionShows how to associate a menu command in a VSPackage with a MEF component.
Walkthrough: Using a Shortcut Key with an Editor ExtensionShows how to associate a menu shortcut in a VSPackage with a MEF component.
Managed Extensibility Framework (MEF)Provides information about the Managed Extensibility Framework (MEF).
Windows Presentation FoundationProvides information about the Windows Presentation Foundation (WPF).

The Visual Studio editor includes the following namespaces.

Microsoft.VisualStudio.Language.Intellisense

Microsoft.VisualStudio.Language.StandardClassification

Microsoft.VisualStudio.Editor

Microsoft.VisualStudio.Text

Microsoft.VisualStudio.Text.Adornments

Microsoft.VisualStudio.Text.Classification

Microsoft.VisualStudio.Text.Differencing

Microsoft.VisualStudio.Text.Document

Microsoft.VisualStudio.Text.Editor

Microsoft.VisualStudio.Text.Editor.OptionsExtensionMethods

Microsoft.VisualStudio.Text.Formatting

Microsoft.VisualStudio.Text.IncrementalSearch

Microsoft.VisualStudio.Text.Operations

Microsoft.VisualStudio.Text.Outlining

Microsoft.VisualStudio.Text.Projection

Microsoft.VisualStudio.Text.Tagging

Microsoft.VisualStudio.Utilities

Show: