registerOnTypeFormattingEditProvider

fun registerOnTypeFormattingEditProvider(selector: DocumentSelector, provider: OnTypeFormattingEditProvider, firstTriggerCharacter: String, vararg moreTriggerCharacter: String): Disposable(source)

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

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

provider

An on type formatting edit provider.

firstTriggerCharacter

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

moreTriggerCharacter

More trigger characters.