Theia API Documentation v1.67.0
    Preparing search index...

    Function registerOnTypeFormattingEditProvider

    • Register a formatting provider that works on type. The provider is active when the user enables the setting editor.formatOnType.

      Multiple providers can be registered for a language. In that case providers are sorted by their score and the best-matching provider is used. Failure of the selected provider will cause a failure of the whole operation.

      Parameters

      • selector: DocumentSelector

        A selector that defines the documents this provider is applicable to.

      • provider: OnTypeFormattingEditProvider

        An on type formatting edit provider.

      • firstTriggerCharacter: string

        A character on which formatting should be triggered, like }.

      • ...moreTriggerCharacter: string[]

        More trigger characters.

      Returns Disposable

      A disposable that unregisters this provider when being disposed.