Functions

f
depth(source: string): number

How many brackets are open at the end of the source — what a continuation prompt counts.

f
highlight(
source: string,
palette: Theme
): string

Source as the terminal should draw it: every token wrapped in its capture's style.

f
tokenize(source: string): Token[]

The source, split into what nvim would capture.

Interfaces

I
Token

A run of source, and what nvim's treesitter queries would capture it as.