Skip to content

Tree-sitter based syntax highlighter for javascript.

Notifications You must be signed in to change notification settings

matoous/treelight

Repository files navigation

Treelight

Tree-sitter based syntax highlighter for javascript runtimes. Uses helix queries and themes under the hood.

Usage

Install treelight using npm:

npm i treelight

In your code:

import { highlight } from 'treelight';

const code = highlight(`console.info("Hello World!")`, 'ts');

console.info(code);