Legacy Language Service Essentials

 

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 Legacy Language Service Essentials.

You must provide a language service to integrate a programming language into Visual Studio. This topic explains the features available in legacy language services.

Legacy language services are implemented as part of a VSPackage, but the newer way to implement language service features is to use MEF extensions. To find out more about the new way to implement a language service, see Editor and Language Service Extensions.

System_CAPS_ICON_note.jpg Note

We recommend that you begin to use the new editor API as soon as possible. This will improve the performance of your language service and let you take advantage of new editor features.

Legacy language services provide the following features:

FeatureDescription
Syntax coloringCauses the editor view to display different colors and font styles for the different elements of a language. This differentiation can make it easier to read and edit files.

For general information, see Syntax Coloring in a Legacy Language Service.

For information about this feature in the managed package framework (MPF), see Syntax Colorizing in a Legacy Language Service.
Statement completionCompletes a statement or keyword that the user has started typing. Statement completion helps users enter difficult statements more easily, with less typing and fewer chances for error.

For general information, see Statement Completion in a Legacy Language Service.

For information about this feature in the MPF, see Word Completion in a Legacy Language Service.
Brace matchingHighlights paired characters such as braces. When the user types a closing character such as "}", brace matching highlights the corresponding opening character, such as "{". When there are several levels of enclosing characters, this feature helps users confirm that the enclosing characters are paired correctly.

For information about this feature in the MPF, see Brace Matching in a Legacy Language Service.
Parameter information tooltipsDisplays a list of possible signatures for the overloaded method that the user is currently typing.

For general information, see Parameter Info in a Legacy Language Service.

For information about this feature in the MPF, see Parameter Info in a Legacy Language Service.
Error markersDisplays a wavy red underline, also known as a squiggly, under text that is syntactically incorrect. Error markers usually are used to make users aware of misspelled keywords, unclosed parentheses, invalid characters, and similar errors.

In the MPF classes, error markers are handled automatically in the AddError method of the AuthoringSink class.

Many of these features require the language service to parse source code. You often can reuse the tokenizing and parsing code for your compiler or interpreter.

The following features are related to support for programming languages but are not part of language services:

FeatureDescription
Expression evaluatorsSupports the Visual Studio debugger by validating breakpoints and supplying a list of expressions to be displayed in the Autos debug window.

For more information, see Language Service Support for Debugging.
Symbol-browsing toolsSupports Object Browser, Class View, Call Browser, and Find Symbol Results.
Show: