An open API service indexing awesome lists of open source software.

https://github.com/oil3/codecolors-quicklook-syntax-highlighting

Very fast macOS extension for coloring code, supports every (60+) uti types. Might be the fastest implementation, and different because 100% Swift: no rtf nor html.
https://github.com/oil3/codecolors-quicklook-syntax-highlighting

macos pycharm python quicklook quicklook-extension quicklook-plugin swift swiftui syntax-coloring syntax-highlighting uti xcode

Last synced: 15 days ago
JSON representation

Very fast macOS extension for coloring code, supports every (60+) uti types. Might be the fastest implementation, and different because 100% Swift: no rtf nor html.

Awesome Lists containing this project

README

        



Code Colors

**Code Colors - Quicklook Preview** is a free, very fast Quicklook Extension for macOS.
It is different than others because it uses new SwiftUI Text capabilities: no html, no rtf, no js.
Very fast as in _breaks the sound barrier_: it's opened before the sound of your spacebar/click ends. [`*`](https://github.com/Oil3/CodeColors-Quicklook-Syntax-Highlighting/tree/oil3#sound-on-truth-of-breaking-the-sound-barrier)

### Features
- **Any File Types**: More than 60 extensions, such as `.swift`, `.py`, `.yaml`, `.xml`, `.json`, `.c`, `.h`, `.mm`, `.1`, `.gradle`... etc, as well as files without extension. But not Markdown. [Info.plit full list](https://github.com/Oil3/CodeColors-Quicklook-Syntax-Highlighting/blob/oil3/QuickCodeColorLook/Info.plist).

- **Syntax Highlighting**: Still basic.
- **Lazy Loading**: Loads lines per 96KB chunks for immediate viewing, stops when view disappears.
- **Pure Swift**: 100% Swift with only the code that is necessary: the minimum and nothing external.
- **Main-Thread Offloading**: All file loading and processing are done off the main thread, safeguarding against system freezes.
- **As safe as your file**: Sandboxed, hardened, notarized, doesn't require internet or any permission whatsoever, doesn't run the files, but applies formatting on strings that match a pattern.
- **No File Associations**: Doesn't replace the default app for opening files, doesn't interfere with workflow.

### Download from Releases or from the repository

Direct download latest [Universal binary (Silicon and Intel)](https://github.com/Oil3/CodeColors-Quicklook-Syntax-Highlighting/releases/download/LatestFeb2025UniversalBinary/CodeColors.2025Feb.Universal.Binary.zip).

## Install
>Launch the app once. This registers the extension as the extension itself stays within the app bundle.

## Uninstall
>Delete the app.

## Update
>Replace the older app with the newer app. MacOS looks for the extension in the app: if app is moved, a relaunch might be needed.


![ss1_lanczos](https://github.com/user-attachments/assets/df6605b5-b4e8-45ed-88af-60a3d98997ab)

### Issues/todo:
The first priority _was_ to handle a _test file with 23millions characters in 200thousands lines_, with immediate render, no freeze and a quick memory release.
Now the needs are:
- Implementing the logic for customizing the colors which is God willing for next update; right now these are just my colors.
- Fixing an issue where a negative number doesn't have its `-` sign colored.
- import profiles
- Markdown is not in the list to not interfere until we have the settings to choose which extension to ignore.

## Sound-on truth of breaking the sound barrier

[Screen Recording 2025-02-21 at 7.57.07 P720M (1).webm](https://github.com/user-attachments/assets/6b0b2024-b001-4179-9e9f-dca328691eca)


_a mac is a mac and it needs to stay comfortable._