registerTimelineProvider

external fun registerTimelineProvider(id: String, label: String, scheme: JsAny, provider: TimelineProvider): Disposable(source)

Register a provider for the timelines of files and folders.

Multiple providers can be registered. In that case, providers are asked in parallel and the results are merged. A failing provider (rejected promise or exception) will not cause a failure of the whole operation.

To activate your extension when the Timeline view is shown, use the onView:timeline activation event.

Parameters

id

A unique identifier for this provider. It is passed to commands and used to filter the Timeline view. Registering two timeline providers with the same id fails. A WorkspaceTimelineProvider registered by the same extension can use the same id, in which case both are shown as one source of the Timeline view.

label

A human-readable name for this provider, shown when filtering the Timeline view.

scheme

A scheme or schemes of the resources this provider provides timelines for. Use * to target all resources.

provider

A timeline provider.