Interface IInlineCompletionItemAlpha

An inline completion item represents a text snippet that is proposed inline to complete text that is being typed.

interface IInlineCompletionItem {
    error?: IInlineCompletionError;
    filterText?: string;
    insertText: string;
    isIncomplete?: boolean;
    token?: string;
}

Hierarchy (view full)

  • IInlineCompletionItemLSP

Properties

This field is marked when an error occurs during a stream or fetch request.

filterText?: string

A text that is used to decide if this inline completion should be shown. When falsy the insertText is used.

An inline completion is shown if the text to replace is a prefix of the filter text.

insertText: string

The text to replace the range with. Must be set. Is used both for the preview and the accept operation.

isIncomplete?: boolean

Whether generation of insertText is still ongoing. If your provider supports streaming, you can set this to true, which will result in the provider's stream() method being called with token which has to be set for incomplete completions.

token?: string