Skip to content

HighlightingService

awaitIdle(): Promise<void>

Promise<void>


awaitRuntimeSessionIdle(runtimeSessionId): Promise<void>

string

Promise<void>


canPrepareDiff(file, theme): boolean

False when the diff is prepared, on screen, or being prepared under this theme’s engine.

DiffFile

HighlightingThemeSource

boolean


dispose(): Promise<void>

Promise<void>


documentBackend(theme): HighlightingDocumentBackend

The backend documents and diffs use under this theme; one object per source and engine.

HighlightingThemeSource

HighlightingDocumentBackend


grammarFor(language): string | null

The grammar a label or language id selects, or null for plain text.

string

string | null


highlight(text, options): Promise<HighlightResult>

Highlights a standalone snippet off the main thread. Rejects on abort, failure or disposal.

string

HighlightOptions

Promise<HighlightResult>


highlighterProvider(theme): EditorHighlighterProvider

Imported-theme colors for documents; one provider per theme source.

HighlightingThemeSource

EditorHighlighterProvider


inspect(): HighlightingServiceSnapshot

HighlightingServiceSnapshot


prepareDiff(file, theme, signal?): Promise<boolean>

Parses a diff ahead of its view and keeps the result; resolves true when it kept one.

DiffFile

HighlightingThemeSource

AbortSignal

Promise<boolean>


showDiff(view, file, side, theme): object

Shows a diff with shared source readers; disposing releases this view’s interests.

HighlightingDiffView

DiffFile

DiffGutterSide

HighlightingThemeSource

object

dispose(): void

void


syntaxProvider(): TreeSitterSyntaxProvider

Structure (folds, brackets, injections, selection) and built-in palette colors.

TreeSitterSyntaxProvider


usesHighlighter(theme): boolean

Whether documents under this theme take colors from the highlighter provider.

HighlightingThemeSource

boolean