Quick look plugin for macOS for source code files in swift. Inspired by QLMarkDown and QLSwift. Source code is rendered by using prism.js. Features include the ability to copy the source file to the clipboard and the display of line numbers in the preview.
written by Dimitri James Tsiflitzis
designed by Dimitris Niavis
Pick any of the methods below:
-
Once you clone this repo, you can run the
SourcePreview
scheme in xcode. A post build step copiesSourcePreview.qlgenerator
into~/Library/QuickLook
and you can start previewing swift files. -
You can build an installer package yourself. Run the project at least once in xcode. Then, in a terminal, go to the
installer
folder located in theSourcePreview
folder. Run thebuild.sh
file. Running this command will create a.pkg
file in thecompiled
folder. Double click on the.pkg
and follow the prompts to install the plugin. -
Download the latest release from https://github.com/tsif/SourcePreview/releases. You can copy
SourcePreview.qlgenerator
into~/Library/QuickLook
manually (runqlmanage -r
once you do this) or you can run the installer package located here.
Drag SourcePreview.qlgenerator
located in ~/Library/QuickLook
into the trash.
MIT License
Copyright (c) 2018 tsif
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Version 1.0.1 - September 18, 2018
- Initial release.