Interface IInlineCompletionProvider<T>

The interface extensions should implement to provide inline completions.

interface IInlineCompletionProvider<T> {
    icon?: ILabIcon;
    identifier: string;
    name: string;
    schema?: IProperty;
    configure?(settings): void;
    fetch(request, context): Promise<IInlineCompletionList<T>>;
    stream?(token): AsyncGenerator<{
        response: T;
    }, any, unknown>;
}

Type Parameters

Hierarchy (view full)

Implemented by

Properties

icon?: ILabIcon

The icon representing the provider in the user interface.

identifier: string

Unique identifier, cannot change on runtime.

The identifier is also added on data attribute of ghost text widget, allowing different providers to style the ghost text differently.

name: string

Name of the provider to be displayed in the user interface.

schema?: IProperty

Settings schema contributed by provider for user customization.

Methods

  • Optional method called when user changes settings.

    This is only called if schema for settings is present.

    Parameters

    Returns void