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:

CategoryLanguages
WebHTML, CSS, JavaScript, TypeScript, JSX, TSX, PHP, Svelte
SystemsC, C++, Objective-C, Rust, Go, Swift, Zig
JVMJava, Kotlin, Scala, Groovy
ScriptingPython, Ruby, Perl, Lua, R
ShellBash, Zsh, PowerShell, Fish
DataJSON, YAML, TOML, XML, CSV, GraphQL, Protobuf
DatabaseSQL, PL/SQL
MarkupMarkdown, LaTeX, reStructuredText
ConfigDockerfile, Nginx, Apache, INI, .env
MobileSwift, Kotlin, Dart
FunctionalHaskell, Elixir, Erlang, F#, OCaml, Clojure
OtherRegex, Diff, Git, Makefile, WASM

The full list of languages is available in the language picker within the editor.

Selecting a Language

Manual Selection

  1. Open or create a snippet.
  2. Click the language picker in the snippet header.
  3. The picker opens with its search field focused. Type a few letters to filter the list, or scroll.
  4. 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.