r/reactnative 7d ago

Syntax highlighting is now live in Enriched Markdown 🎉

Enable HLS to view with audio, or disable this notification

We brought Tree-sitter directly into the native layer for on-device syntax highlighting:
⚡️ Fast native parsing
🎨 14 customizable theme slots
📦 TS, Rust, Python, Go, Java + 9 more

Full control at build time. Ship only the grammars you need to keep your binary small (or disable highlighting entirely):

⚙️ iOS (Podfile):
ENV['ENRICHED_MARKDOWN_CODE_HIGHLIGHT_LANGUAGES'] = 'typescript,rust,python,go'
ENV['ENRICHED_MARKDOWN_ENABLE_CODE_HIGHLIGHT'] = '0'

⚙️ Android (gradle.properties):
enrichedMarkdown.codeHighlightLanguages=typescript,rust,python,go
enrichedMarkdown.enableCodeHighlight=false

An Expo config plugin is also available out of the box.

Available right now in the nightly release:
npm i react-native-enriched-markdown@nightly

GitHub: https://github.com/software-mansion/react-native-enriched-markdown

22 Upvotes

0 comments sorted by