CompletionContext

A CompletionContext object defines information about the request for completion items within an editor. A completion context is used when building CompletionItem objects.

Properties

text

The word immediately proceeding the cursor, or an empty string if no word exists. The cursor will be positioned directly after the last character in this string.

This property is readonly.

line

The text of the entire line preceding the cursor, not including indentation whitespace. The cursor will be positioned directly after the last character in this string.

This property is readonly.

position

The character position of the cursor within the requesting text editor, as a number.

This property is readonly.

reason

The reason the completion was triggered, as a value from the CompletionReason enumeration.

The values for the CompletionReason enumeration are:

This property is readonly.