Syntax Highlighting
Write code with Prism-powered syntax highlighting across hundreds of languages, automatic language detection, and a searchable language picker.
SnipperApp 3 uses Prism as its syntax highlighting engine, providing accurate and visually rich code rendering for over 50 programming languages.
Supported Languages
SnipperApp 3 supports syntax highlighting for the following languages:
| Category | Languages |
|---|---|
| Web | HTML, CSS, JavaScript, TypeScript, JSX, TSX, PHP, Svelte |
| Systems | C, C++, Objective-C, Rust, Go, Swift, Zig |
| JVM | Java, Kotlin, Scala, Groovy |
| Scripting | Python, Ruby, Perl, Lua, R |
| Shell | Bash, Zsh, PowerShell, Fish |
| Data | JSON, YAML, TOML, XML, CSV, GraphQL, Protobuf |
| Database | SQL, PL/SQL |
| Markup | Markdown, LaTeX, reStructuredText |
| Config | Dockerfile, Nginx, Apache, INI, .env |
| Mobile | Swift, Kotlin, Dart |
| Functional | Haskell, Elixir, Erlang, F#, OCaml, Clojure |
| Other | Regex, Diff, Git, Makefile, WASM |
The full list of languages is available in the language picker within the editor.
Selecting a Language
Manual Selection
- Open or create a snippet.
- Click the language picker in the snippet header.
- The picker opens with its search field focused. Type a few letters to filter the list, or scroll.
- Click the language you want.
The editor immediately applies syntax highlighting for the chosen language.
Your Languages
SnipperApp supports hundreds of languages, and you probably use a handful. The picker keeps yours on top:
- Star a language. Every row has a ☆. Click it, or press Space on the highlighted row (use the arrow keys to move the highlight), to star the language. Starred languages appear under Favorites at the top of the list. Click the star again to remove one.
- Show only my languages. Turn this on to hide every language you have not starred. The snippet's current language always stays visible, even if it is not starred.
- Recently Used. The last eight languages you picked are listed under Recently Used, so switching between a few languages takes one click.
Language Detection
When you paste code into a new snippet, SnipperApp 3 can detect the language automatically based on common patterns and keywords in the code. This works best for languages with distinctive syntax such as Python, HTML, SQL, and Swift.
You can always override the detected language by manually selecting a different one from the dropdown.
Plain Text
If your snippet is not source code (for example, a configuration note or free-form text), select Plain Text from the language list. This disables syntax highlighting and treats the content as unformatted text.
For formatted text with headings, lists, and inline images, create a Note instead of a snippet.
How Prism Highlighting Works
Prism tokenizes your code into meaningful segments (keywords, strings, comments, operators, functions, and more) and applies color styling to each token type. The colors are determined by the active editor theme.
Key characteristics of the Prism engine:
- Accurate tokenization. Prism handles edge cases like nested template literals, regex patterns, and multi-line strings correctly.
- Performance. Highlighting is applied incrementally and does not block the editor, even for large snippets.
- Theme-aware. Token colors adapt to the selected Prism theme, ensuring readability in both light and dark appearances.
Tips
- Choose the right language for accurate highlighting. A snippet marked as "JavaScript" will not highlight Python-specific syntax correctly.
- Use Markdown for snippets that mix prose and code. The Markdown renderer supports fenced code blocks with language-specific highlighting.
- Syntax highlighting is purely visual. It does not modify your snippet content in any way.
Related
- Editor Themes. Change the color scheme used for highlighting.
- Markdown Preview. Preview Markdown with embedded syntax-highlighted code blocks.