All-in-one Quick Look plugin for macOS
Glance provides Quick Look previews for files that macOS doesn't support out of the box.
Note: This is a maintained fork of samuelmeuli/glance, which was archived by its original author. This fork updates the project to build and run on modern macOS versions (Ventura, Sonoma, Sequoia) with current Xcode, Swift, and Go toolchains. See Changes from upstream below for details.
-
Source code (with Chroma syntax highlighting):
.cpp,.js,.json,.py,.swift,.ymland many more -
Markdown (rendered using goldmark):
.md,.markdown,.mdown,.mkdn,.mkd,.Rmd -
Archive:
.tar,.tar.gz,.zip -
Jupyter Notebook:
.ipynb -
Tab-separated values (parsed using SwiftCSV):
.tab,.tsv
This fork was created because the original project by Samuel Meuli was archived and no longer maintained, while the Quick Look extension remained useful and had no drop-in replacement. The following changes have been made:
- macOS compatibility -- Updated deployment target, build settings, and APIs to support macOS 13+ (Ventura, Sonoma, Sequoia) on both Intel and Apple Silicon
- Go toolchain -- Upgraded from Go 1.14 to a current release; updated all Go dependencies including the Chroma v0 to v2 migration
- Jupyter Notebook support -- Replaced the archived
nbtohtmldependency with a built-in converter - Swift dependencies -- Updated SwiftCSV, replaced
swift-exec, and modernized Swift APIs - Deprecated APIs -- Replaced hardcoded system icon paths, WKWebView private API usage, and other deprecated patterns
- Rebranded identifiers -- Bundle IDs moved to
io.2075.Glancenamespace for independent signing and distribution
Xcode, Swift, and Go need to be installed to build the app locally.
# Clone the repo
git clone https://github.com/2075/glance.git
cd glance
# Open in Xcode
open Glance.xcodeprojBuild and run the Glance scheme. The Quick Look extension is embedded automatically.
Web-based previews (Markdown, source code, Jupyter Notebooks) support zoom:
- Pinch to zoom on a trackpad to scale the preview content
- Cmd +
+/ Cmd +-to zoom in or out (0.5x -- 3.0x range) - Cmd +
0to reset zoom to 100%
Why does Glance require network permissions?
Glance renders some previews in a WKWebView. All assets are stored locally and network access is disabled, but web views unfortunately still need the com.apple.security.network.client entitlement to function.
Why are images in my Markdown files not loading?
Glance blocks remote assets. Furthermore, the app only has access to the file that's being previewed. Local image files referenced from Markdown are therefore not loaded.
Why isn't [file type] supported?
Feel free to open an issue or contribute! When opening an issue, please describe what kind of preview you'd expect for your file.
Please note that macOS doesn't allow the handling of some file types (e.g. .plist, .ts and .xml).
You claim to support [file type], but previews aren't showing up.
Please note that Glance skips previews for large files to avoid slowing down your Mac.
It's possible that your file's extension or UTI isn't associated with Glance. You can easily verify this:
- Check whether the file extension is matched to the correct class in
PreviewVCFactory.swift. - Find your file's UTI by running
mdls -name kMDItemContentType /path/to/your/file. Check whether the UTI is listed underQLSupportedContentTypesinInfo.plist. - If an association is missing, please feel free to add it and submit a PR.
Suggestions and contributions are always welcome! Please discuss larger changes (e.g. adding support for a new file type) via issue before submitting a pull request.
To add previews for a new file extension, please follow these steps:
- Create a new class for your file type in this directory. It should implement the
Previewprotocol. See the other files in the directory for examples. - Match the file extension to your class in
PreviewVCFactory.swift. - Find your file's UTI by running
mdls -name kMDItemContentType /path/to/your/file. Add it toQLSupportedContentTypesinInfo.plist. - Update this README and
SupportedFilesWC.xibaccordingly.
Originally created by Samuel Meuli. This fork is maintained by 2075.
Licensed under the MIT License.




