Syntax Highlighting Packages
Source-code syntax-highlighting libraries for rendering readable, colorized code blocks in docs, editors, and blogs (Shiki, Prism, highlight.js).
Packages in Syntax Highlighting
Kind
Sort:Used by Most Apps
highlight.js
Zero-dependency JavaScript syntax highlighter with automatic language detection for over 190 languages.
React Syntax Highlighter
A React component for syntax-highlighting code blocks using highlight.js or Prism ASTs, with JavaScript-based styles and no external stylesheet required.
lowlight
Virtual syntax highlighting for virtual DOMs and non-HTML things, powered by highlight.js
rehype-highlight
Rehype plugin that syntax-highlights code blocks at build time using lowlight and highlight.js.
tree-sitter-typescript
TypeScript and TSX grammars for the tree-sitter incremental parsing framework.
tree-sitter-python
A fast, incremental Python grammar for the tree-sitter parsing library
tree-sitter-javascript
JavaScript and JSX grammar for the tree-sitter incremental parsing library
tree-sitter-rust
A fast, incremental Rust grammar for the tree-sitter parsing library
tree-sitter-cpp
A fast, incremental C++ grammar for the tree-sitter parsing library
tree-sitter-go
A fast, incremental Go grammar for the tree-sitter parsing library
tree-sitter-c-sharp
C# grammar for tree-sitter, based on the Roslyn language grammar
tree-sitter-java
A fast, incremental Java grammar for the tree-sitter parsing library
Chroma
A general-purpose syntax highlighting library for Go, supporting 200+ languages and multiple output formats out of the box.
syntect
High-quality Rust syntax highlighting using Sublime Text's grammar and theme formats
refractor
Lightweight virtual syntax highlighter that wraps Prism to output hast syntax trees instead of HTML strings.
tree-sitter-c
The official C grammar for the tree-sitter incremental parsing library
tree-sitter-php
Incremental PHP grammar for the tree-sitter parsing library
tree-sitter-ruby
The official Ruby grammar for the tree-sitter incremental parsing library
tree-sitter-json
Fast, incremental JSON grammar for the Tree-sitter parsing framework.
tree-sitter-scala
A tree-sitter grammar for parsing Scala source code into a concrete syntax tree.
tree-sitter (Python)
Python bindings to the Tree-sitter incremental parsing library for building concrete syntax trees from source code.
Sugar High
Lightweight, zero-dependency syntax highlighter that turns code into HTML without a DOM, in browsers and JS runtimes alike.
node-tree-sitter
Node.js bindings to the tree-sitter incremental parsing library for building and querying syntax trees.
tree-sitter-md
Fast, incremental Markdown grammar for the Tree-sitter parsing framework.