Interface InlineCompletionsProvider<T>

interface InlineCompletionsProvider<T> {
    groupId?: string;
    yieldsToGroupIds?: string[];
    freeInlineCompletions(completions): void;
    handleItemDidShow?(completions, item, updatedInsertText): void;
    handlePartialAccept?(completions, item, acceptedCharacters, info): void;
    provideInlineCompletions(model, position, context, token): ProviderResult<T>;
    toString?(): string;
}

Type Parameters

Properties

groupId?: string

Only used for yieldsToGroupIds. Multiple providers can have the same group id.

yieldsToGroupIds?: string[]

Returns a list of preferred provider groupIds. The current provider is only requested for completions if no provider with a preferred group id returned a result.

Methods

  • Will be called when a completions list is no longer in use and can be garbage-collected.

    Parameters

    • completions: T

    Returns void

  • Will be called when an item is shown.

    Parameters

    • completions: T
    • item: T["items"][number]
    • updatedInsertText: string

      Is useful to understand bracket completion.

    Returns void

  • Will be called when an item is partially accepted.

    Parameters

    Returns void

  • Returns string