Packages

Syntax Highlighting Packages

Source-code syntax-highlighting libraries for rendering readable, colorized code blocks in docs, editors, and blogs (Shiki, Prism, highlight.js).

87 packages

Packages in Syntax Highlighting

56Health
Library Cargo

tree-sitter-c-sharp

C# grammar for tree-sitter, based on the Roslyn language grammar

322
MIT
Used by 7
22Health
Library npm

@codemirror/lang-java

Java language support for the CodeMirror 6 editor, powered by a Lezer grammar.

16
MIT
Used by 7
22Health
Library npm

@codemirror/lang-cpp

C++ language support for the CodeMirror 6 code editor, with syntax highlighting, indentation, and code folding.

11
MIT
Used by 7
52Health
Library Cargo

tree-sitter-java

A fast, incremental Java grammar for the tree-sitter parsing library

277
MIT
Used by 6
92Health
Library Go

Chroma

A general-purpose syntax highlighting library for Go, supporting 200+ languages and multiple output formats out of the box.

5,064
MIT
Used by 5
49Health
Library Cargo

syntect

High-quality Rust syntax highlighting using Sublime Text's grammar and theme formats

2,448
MIT
Used by 5
72Health
Library npm

expressive-code

A framework-agnostic engine that renders source code as richly annotated, syntax-highlighted HTML.

967
MIT
Used by 5
41Health
Library npm

refractor

Lightweight virtual syntax highlighter that wraps Prism to output hast syntax trees instead of HTML strings.

868
MIT
Used by 5
21Health
Library npm

tree-sitter-wasms

Prebuilt WebAssembly binaries for 40+ tree-sitter language parsers, ready to import without a native build step.

18
Other
Used by 5
50Health
Library npm

rehype-pretty-code

A rehype plugin that transforms Markdown and MDX code blocks into beautifully styled, Shiki-highlighted HTML with line highlighting, captions, and multi-theme support.

1,317
MIT
Used by 4
53Health
Library Cargo

tree-sitter-c

The official C grammar for the tree-sitter incremental parsing library

393
MIT
Used by 4
70Health
Library Cargo

tree-sitter-php

Incremental PHP grammar for the tree-sitter parsing library

234
MIT
Used by 4
53Health
Library Cargo

tree-sitter-ruby

The official Ruby grammar for the tree-sitter incremental parsing library

228
MIT
Used by 4
55Health
Library Cargo

tree-sitter-json

Fast, incremental JSON grammar for the Tree-sitter parsing framework.

204
MIT
Used by 4
82Health
Library Cargo

tree-sitter-scala

A tree-sitter grammar for parsing Scala source code into a concrete syntax tree.

199
MIT
Used by 4
18Health
Library npm

codemirror-lang-elixir

Elixir language support for the CodeMirror 6 code editor, with syntax highlighting, smart indentation, and code folding.

10
Apache 2.0
Used by 4
66Health
Library PyPI

tree-sitter (Python)

Python bindings to the Tree-sitter incremental parsing library for building concrete syntax trees from source code.

1,513
MIT
Used by 3
85Health
Library npm

Sugar High

Lightweight, zero-dependency syntax highlighter that turns code into HTML without a DOM, in browsers and JS runtimes alike.

1,381
MIT
Used by 3
53Health
Library npm

node-tree-sitter

Node.js bindings to the tree-sitter incremental parsing library for building and querying syntax trees.

880
MIT
Used by 3
75Health
Library Cargo

tree-sitter-md

Fast, incremental Markdown grammar for the Tree-sitter parsing framework.

628
MIT
Used by 3
53Health
Library Cargo

tree-sitter-bash

Incremental Bash/shell grammar for the tree-sitter parsing library

333
MIT
Used by 3
38Health
Library npm

rehype-prism-plus

Rehype plugin that highlights code blocks with Prism, adding line numbers, line highlighting, and diff annotations to Markdown/MDX output.

201
MIT
Used by 3
29Health
Library npm

markdown-it-highlightjs

Preset that wires highlight.js into markdown-it so fenced, indented, and inline code blocks get syntax-highlighted HTML at render time.

71
Other
Used by 3
21Health
Library npm

codemirror-lang-svelte

Svelte language support for CodeMirror 6, with a native Lezer grammar, nested JS/CSS parsing, indentation, and code folding.

33
MIT
Used by 3

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers