1 pointby realityloop6 hours ago1 comment
  • realityloop6 hours ago
    In 2012 I forked QLColorCode, a Quick Look plugin, to add the Drupal file types I worked with every day at the time. I kept that fork going for about a decade. Apple deprecated the whole .qlgenerator format that used some time ago. On current macOS the old code previewer just doesn't load, and you can't port it either as it colored code by shelling out to external tools, while the modern replacement (Quick Look app extensions) runs in a sandbox that won't let you spawn anything.

    So this is a rewrite in Objective-C with its own highlighter using per-language compiled regexes running inside the extension's sandbox, no external processes. A 2 MB Objective-C file highlights in about 140 ms end to end, so space-bar preview still stays snappy.

    It covers 51 languages (130+ filetypes) out of the box. Font, themes, line numbers and extension-to-language overrides are configurable in the app, and settings reach the sandboxed extension through a shared defaults domain.

    Builds are universal but I've only tested on Apple Silicon, and macOS 12 is the floor. Install is available via Homebrew or direct download.

    Development was AI assisted as most are now, I made all the decisions and spent time specifically optimizing for performance. I don't think it's too sloppy, and is working very well for me at least.

    I care about privacy, so It doesn't phone home at all, the only stats I get are from Github's download counts.

    The source is on GitHub under the MIT license.