Skip to content

A syntax highlighting library that uses Tree-sitter. This is a mirror of https://gitlab.com/noClaps/highlight/

License

Notifications You must be signed in to change notification settings

noClaps/highlight

Repository files navigation

Highlight

A syntax highlighting library that uses Tree-sitter for incredibly quick parsing and highlighting.

Usage

Install the package as a dependency to your project:

bun add @noclaps/highlight

and then import it into your code:

import { highlight, type Theme } from "@noclaps/highlight";

const theme: Theme = {
... // Your theme here
}

const myCode = `
console.log("Hello World");
`

const htmlOutput = highlight(code, "ts", theme);
// <pre>...</pre> HTML output

About

A syntax highlighting library that uses Tree-sitter. This is a mirror of https://gitlab.com/noClaps/highlight/

Resources

License

Stars

Watchers

Forks