A macOS Quick Look extension that provides syntax-highlighted previews for Visual Studio Solution files (.sln and .slnx).
- π¨ Syntax Highlighting - Color-coded XML and text-based solution files
- π’ Line Numbers - Easy reference with line numbers on the left
- π Smart Copy - Copy text without line numbers automatically
- π Dark Theme - VS Code-inspired color scheme
- β‘ Fast & Lightweight - Native Swift implementation, no dependencies
- π Sandboxed - Secure Quick Look extension
.sln- Visual Studio Solution files (text-based format).slnx- Visual Studio XML Solution files (XML format)
Both traditional text-based .sln files and modern XML-based .slnx files are supported with appropriate syntax highlighting.
# Add the tap (once)
brew tap lewiuberg/tap
# Install SlnQuickLook
brew install --cask slnquicklookAfter installation:
- Open the SlnQuickLook app once to register the extension
- If macOS blocks it (unsigned app warning):
- Go to System Settings β Privacy & Security
- Scroll down and click "Open Anyway"
- Try opening the app again and confirm
- If macOS blocks it (unsigned app warning):
- Reset Quick Look:
qlmanage -r && qlmanage -r cache - Restart Finder:
killall Finder - Select a
.slnor.slnxfile and press Space to preview
- Download the latest release from Releases
- Unzip and move
SlnQuickLook.appto/Applications/ - Open the app once to register the Quick Look extension
- If macOS blocks it (unsigned app warning):
- Go to System Settings β Privacy & Security
- Scroll down and click "Open Anyway"
- Try opening the app again and confirm
- If macOS blocks it (unsigned app warning):
- Reset Quick Look cache:
qlmanage -r && qlmanage -r cache - Restart Finder:
killall Finder
Requirements:
- macOS 12.0 (Monterey) or later
- Xcode 14.0 or later
# Clone the repository
git clone https://github.com/lewiuberg/SlnQuickLook.git
cd SlnQuickLook
# Open in Xcode
open SlnQuickLook.xcodeproj
# Build and run (βR)
# The extension will be registered automatically- Preview a file: Select a
.slnor.slnxfile in Finder and press Space - Copy content: Select text in the preview and press βC - line numbers are automatically excluded
- Scroll: Use mouse/trackpad to scroll through large files
- Close preview: Press Space or Esc
- Make sure you've opened the SlnQuickLook app at least once
- Reset Quick Look:
qlmanage -r qlmanage -r cache killall Finder
- Check if the extension is loaded:
Look for
qlmanage -m
SlnQuickLookin the output
If another app is opening .sln/.slnx files:
- Right-click the file β Get Info
- Under "Open with:", select SlnQuickLook
- Click "Change All..."
Try re-registering the app:
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -f -R /Applications/SlnQuickLook.app- Language: Swift 5.0
- Framework: QuickLook, AppKit
- Minimum macOS: 12.0 (Monterey)
- Code Signing: Required for distribution
The extension provides custom syntax highlighting:
XML-based files (.slnx):
- Green: XML tags (
<Project>,</Solution>) - Blue: Attribute names (
Path=,Name=) - Orange: Attribute values (
"src/...")
Text-based files (.sln):
- Green: Keywords (
Project,EndProject,Global) - Orange: String values (quoted text)
- Gray: Comments (lines starting with
#)
- Handles files up to several MB efficiently
- Lazy rendering for large files
- No external dependencies
- Minimal memory footprint
SlnQuickLook/
βββ SlnQuickLook/ # Main app (hosts extension)
β βββ Assets.xcassets/
β βββ Info.plist
β βββ SlnQuickLookApp.swift
β βββ ContentView.swift
βββ SlnQuickLookPreviewExtension/ # Quick Look extension
βββ Info.plist
βββ PreviewViewController.swift # All logic
# Debug build
xcodebuild -scheme SlnQuickLook -configuration Debug
# Release build
xcodebuild -scheme SlnQuickLook -configuration Release
# Run tests (if any)
xcodebuild test -scheme SlnQuickLookContributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Please ensure:
- Code follows Swift style guidelines
- Changes are tested on macOS 12.0+
- Commit messages are clear and descriptive
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by Quick Look extensions like QLMarkdown
- Color scheme inspired by Visual Studio Code's Dark+ theme
- Built with Apple's QuickLook framework
Lewi Uberg
- GitHub: @lewiuberg
If you find this useful, please:

