Lighter
Highlighter comparison
Lighter extends Arborium with semantic highlighting from language servers.
Arborium provides Tree-sitter-based syntactic highlighting.
Highlight.js is a popular regex-based JavaScript highlighter.
Drag the divider to reveal the comparison.
Lighter adds project-aware language-server semantics to Arborium’s syntax tree, producing the most precise distinctions at the cost of language-server setup and no dynamic in-browser highlighting. Between the syntax-only options, Arborium’s real parser handles nesting, scope, and malformed code more reliably, but its per-language WebAssembly grammars add download weight. Highlight.js trades that structural accuracy for a zero-dependency JavaScript integration, automatic language detection, and broader language coverage, making it easier to use on dynamic web pages.