Interface ICompletionProvider<T>

The interface to implement a completion provider.

Type Parameters


  • ICompletionProvider

Implemented by


identifier: string

Unique identifier of the provider

rank?: number

Rank used to order completion results from different completion providers.

Note: The default providers (CompletionProvider:context and

CompletionProvider:kernel) use a rank of ≈500. If you want to give priority to your provider, use a rank of 1000 or above.

The rank is optional for backwards compatibility. If the rank is undefined, it will assign a rank of [1, 499] making the provider available but with a lower priority.

Renderer for provider's completions (optional).


  • Is completion provider applicable to specified context?


    Returns Promise<boolean>

  • This method is called to customize the model of a completer widget. If it is not provided, the default model will be used.


    Returns Promise<Completer.IModel>

    The completer model

  • Given an incomplete (unresolved) completion item, resolve it by adding all missing details, such as lazy-fetched documentation.


    • completionItem: T

      the completion item to resolve

    • context: ICompletionContext

      The context of the completer

    • Optional patch: IPatch

      The text which will be injected if the completion item is selected.

    Returns Promise<T>

  • If users enable autoCompletion in setting, this method is called on text changed event of CodeMirror to check if the completion items should be shown.


    • completerIsVisible: boolean

      Current visibility status of the completer widget

    • changed: SourceChange

      changed text.

    • Optional context: ICompletionContext

      The context of the completer (optional).

    Returns boolean

Generated using TypeDoc