ProvideLanguageServiceAttribute.EnableAsyncCompletion Property


Determines whether the language supports background parsing.

Namespace:   Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.14.0 (in Microsoft.VisualStudio.Shell.14.0.dll)

public bool EnableAsyncCompletion { get; set; }

Property Value

Type: System.Boolean

Returns true if background parsing is allowed; otherwise, returns false.

Whenever a completion list needs to be displayed, a parsing operation is started to determine what goes in the completion list. To maintain the responsiveness of the user interface, the parsing operation should be performed on a background thread. If a language service supports background parsing, set the EnableAsyncCompletion property to true.


The managed package framework (MPF) examines this property anytime it starts a potentially lengthy parse and not just for completion lists.

This property is specific to the managed package framework (MPF).

The default is true when the corresponding registry entry is accessed through the LanguagePreferences class.

The registry entry looks like this:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\[X.Y]\Languages\Language Services\
  [Language Name]\
    EnableAsyncCompletion = reg_dword: 0x00000001

[ProvideLanguageService(typeof(MyLanguageService),           // Required
                        MyConstants.languageName,            // Required
                        MyConstants.languageNameResourceID,  // Required
    // Optional language service properties
    EnableAsyncCompletion = true,  // Background parsing supported
Return to top