Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/noclaps/highlight
A syntax highlighting library that uses Tree-sitter
https://github.com/noclaps/highlight
rust syntax-highlighting tree-sitter typescript
Last synced: about 11 hours ago
JSON representation
A syntax highlighting library that uses Tree-sitter
- Host: GitHub
- URL: https://github.com/noclaps/highlight
- Owner: noClaps
- License: 0bsd
- Created: 2024-12-28T21:42:14.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2025-02-09T21:36:57.000Z (5 days ago)
- Last Synced: 2025-02-14T02:18:26.870Z (1 day ago)
- Topics: rust, syntax-highlighting, tree-sitter, typescript
- Language: TypeScript
- Homepage: https://docs.zerolimits.dev/highlight
- Size: 6.49 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Highlight
A syntax highlighting library that uses [Tree-sitter](https://tree-sitter.github.io/tree-sitter/) for incredibly quick parsing and highlighting.
## Usage
Install the package as a dependency to your project:
```sh
bun add @noclaps/highlight
```and then import it into your code:
```ts
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);
//...HTML output
```