How to: Use Built-In Colorable Items
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 How to: Use Built-In Colorable Items.
Before you use the built-in colorable items, you must first signal to the integrated development environment (IDE) that you are not providing your own custom colorable items, which in this case would be IVsProvideColorableItems objects. You do this by setting a registry entry for the language service.
To use built-in colorable items
Under HKEY_LOCAL_MACHINE\VisualStudio\X.Y\Languages\Language Services\Language Name, where X.Y is a version of Visual Studio and Language Name is the name of your language, create a DWORD registry entry value called
RequestStockColors.Set the
RequestStockColorsregistry entry value to 1.After you create the registry entry, your colorizer's ColorizeLine method can use the members of the DEFAULTITEMS enumeration to fill in the array of color attributes for use by the editor.
Note Do not set this registry entry if you are providing custom colorable items. For more information, see Custom Colorable Items.
Syntax Coloring in Custom Editors
Syntax Coloring in a Legacy Language Service
Implementing Syntax Coloring
Custom Colorable Items
Registering a Legacy Language Service