CLI tool
sbarex/SourceCodeSyntaxHighlight avatar
sbarex/SourceCodeSyntaxHighlight

SourceCodeSyntaxHighlight: a Quick Look extension that renders source files in Finder

Quick Look extension for highlight source code files on macOS 12 and later.

4,284 stars100 forksC++GPL-3.0

At a glance

What is it?
The extension replaces macOS's plain-text Quick Look preview of code files with syntax-highlighted output rendered by Highlight. It is for macOS 12 and later, it is GPL-3.0, and its last push was on 2026-09-16.
Who is it for?
Adopt it if you read code in Finder and want highlighting without opening an editor; skip it if you need previews of .dart, .html or .ts files, since the README lists those as reserved or blocked by macOS. Before relying on it, launch the app once, enable the extension under System preferences > Extensions > Quick Look, and confirm that your file types appear in the supported formats list.
Can I use it commercially?
Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
Is it still maintained?
Yes. The repository last received commits 14 days ago.
What is it written in?
Mainly C++, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 30, 2026, and from our analysis. They are not legal advice.

Editorial analysis

The problem: Finder previews code as flat text

Quick Look is the fastest way to inspect a file on macOS, but a .cpp or .rb file opens as monochrome text. SourceCodeSyntaxHighlight replaces that preview with a rendered, highlighted version. The target user is someone who browses repositories in Finder, checks a patch before opening an IDE, or reviews a config file without launching an editor. The README positions it as a Quick Look Extension for macOS 12.0 and later, and the project has been distributed since the 10.15 era: for macOS 11 and 10.15, the latest compatible version is 2.1.30. That version boundary matters if you manage mixed-OS fleets, because the 2.1.31 and 2.1.32 releases from September 2026 target the newer extension model.

How the extension renders a file: UTI matching, Highlight, XPC

The extension does not match file name extensions. It matches Uniform Type Identifiers, the system-level type declarations that carry their own extension and MIME lists. That choice explains why the supported formats list looks redundant: some extensions map to several UTIs depending on which applications are installed, and the README says the app supports many UTIs even when they appear to overlap. Rendering is delegated to Highlight, the external formatter by Andre Simon. The repository layout shows the split: QLExtension/ holds the Finder-facing extension, SyntaxHighlightRenderXPC/ and XPCService/ hold the rendering service, and highlight-wrapper/ wraps the formatter. The XPC boundary is the interesting design decision. Rendering arbitrary source files is exactly the kind of work you do not want inside the Quick Look process, and a separate service limits the blast radius of a malformed file. The cost is more moving parts to sign, entitlements to manage, and a second process to keep in sync with the host app.

Install SourceCodeSyntaxHighlight with Homebrew or a release build

Two install paths are documented. The precompiled release is codesigned and notarized; you download it from the releases page and move Syntax Highlight.app into the Applications folder. Homebrew is the shorter route. This command installs the current version:

bash
brew install syntax-highlight

After either install, the application must be launched at least once so the system discovers the Quick Look extension. Then open System preferences > Extensions > Quick Look and enable it. If you build from source instead, the README reminds you to fetch submodules after cloning:

bash
git submodule init
bash
git submodule update

The release application is compiled as a universal binary for Intel and Apple silicon. Once the extension is enabled, select a source file in Finder and press Space; you should get a highlighted preview instead of plain text. The main application checks for updates automatically when launched.

Formats macOS will not let the extension touch

This is the limitation that decides adoption for many people. The README states that macOS 10.15 Catalina does not allow management of some formats, including .xml, .plist, .html, .ts, .dart, .txt and common images. On macOS 11 Big Sur the system allows .plist; on macOS 12 Monterey it allows .xml. The .dart entry in the supported formats list carries the bluntest note: .dart is reserved by macOS and cannot be handled. So a Flutter developer on macOS 12 gets no Dart previews, and a TypeScript or HTML file is also out. That is an operating system constraint, not a bug in the extension, and no configuration in the app settings changes it. If your daily work is TypeScript, HTML or Dart, this tool will not replace your editor's file browser.

How it differs from QLColorCode and QLStephen

The related searches around this project point at the older generation of Quick Look plugins: QLColorCode and QLStephen. The architectural difference is the extension model. QLColorCode and similar plugins were loaded directly into the Quick Look process through the legacy plugin mechanism, which macOS has been retiring; SourceCodeSyntaxHighlight ships as a modern Quick Look Extension with the rendering pushed into an XPC service. That is why it requires macOS 12 for current releases and why the 2.1.30 line exists as the fallback for 10.15 and 11. QLStephen, by contrast, is a plain-text previewer: it makes text files visible in Quick Look rather than highlighting them, so it is not a substitute if highlighting is what you want. The other differentiator is breadth. The supported formats list runs from Ada to Dockerfile, and it includes non-obvious cases such as AppleScript files decompiled automatically with osadecompile and Azkaban .flow files treated as YAML.

Maintenance, licence and what an upgrade costs you

The repository is not archived and the last push was on 2026-09-16, with release 2.1.32 published the same day. The release cadence is uneven: 2.1.30 landed on 2026-04-14, then 2.1.31 and 2.1.32 arrived within a day of each other in September. Upgrades are cheap in operational terms because the app checks for updates itself, but they are not free in compatibility terms. The 2.1.30 note for macOS 11 and 10.15 means an OS upgrade is what moves you onto the current line, not a package pin. The project is GPL-3.0. If you only install and use the app, that is the normal end-user path. If you intend to redistribute a modified build inside a product, the copyleft terms apply to the derivative work, and the README's warranty disclaimer is explicit that the software is distributed without any warranty. For a commercial bundle, have counsel read the licence rather than treating this summary as advice.

Editorial conclusion

Adopt it if you read code in Finder and want highlighting without opening an editor; skip it if you need previews of .dart, .html or .ts files, since the README lists those as reserved or blocked by macOS. Before relying on it, launch the app once, enable the extension under System preferences > Extensions > Quick Look, and confirm that your file types appear in the supported formats list.

Frequently asked questions

How do I install SourceCodeSyntaxHighlight on macOS?

Install it with brew install syntax-highlight, or download the codesigned and notarized release from the releases page and move Syntax Highlight.app into the Applications folder. You must launch the application at least once, then enable the extension under System preferences > Extensions > Quick Look.

Why does SourceCodeSyntaxHighlight not preview my .dart or .ts files?

The README states that .dart is reserved by macOS and cannot be handled, and that macOS 10.15 Catalina does not allow management of .ts, .html and .xml among others. On macOS 12 Monterey the system allows .xml. These are operating system restrictions on the extension, not settings inside the app.

Which macOS versions does SourceCodeSyntaxHighlight support?

The current releases target macOS 12.0 and later. For macOS 11 and 10.15, the README says the latest compatible version is 2.1.30.

Official sources

  1. License: GPL-3.0
  2. Project website
  3. README
  4. Releases
  5. sbarex/SourceCodeSyntaxHighlight on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/sbarex-sourcecodesyntaxhighlight.svg)](https://hysenlabs.com/projects/sbarex-sourcecodesyntaxhighlight)