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
tree-sitter-c-sharp
C# grammar for tree-sitter, based on the Roslyn language grammar
@codemirror/lang-java
Java language support for the CodeMirror 6 editor, powered by a Lezer grammar.
@codemirror/lang-cpp
C++ language support for the CodeMirror 6 code editor, with syntax highlighting, indentation, and code folding.
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
expressive-code
A framework-agnostic engine that renders source code as richly annotated, syntax-highlighted HTML.
refractor
Lightweight virtual syntax highlighter that wraps Prism to output hast syntax trees instead of HTML strings.
tree-sitter-wasms
Prebuilt WebAssembly binaries for 40+ tree-sitter language parsers, ready to import without a native build step.
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.
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.
codemirror-lang-elixir
Elixir language support for the CodeMirror 6 code editor, with syntax highlighting, smart indentation, and code folding.
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.
tree-sitter-bash
Incremental Bash/shell grammar for the tree-sitter parsing library
rehype-prism-plus
Rehype plugin that highlights code blocks with Prism, adding line numbers, line highlighting, and diff annotations to Markdown/MDX output.
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.
codemirror-lang-svelte
Svelte language support for CodeMirror 6, with a native Lezer grammar, nested JS/CSS parsing, indentation, and code folding.