Releases: CreatureSurvive/SwiftHighlight
Releases · CreatureSurvive/SwiftHighlight
Release list
SwiftHighlight 1.0.0
First release of SwiftHighlight: a fast, pure-Swift syntax highlighter.
- Engine: declarative Swift/JSON grammars compiled to a bytecode VM. It has per-state first-byte dispatch, automatic possessification and per-line step budgets. Throughput is 40–130 MB/s per language, and worst-case time stays linear.
- 33 languages: Swift, Objective-C, C, C++, C#, Java, Kotlin, Dart, Go, Rust, JavaScript/JSX, TypeScript, TSX, JSON, HTML (with embedded JS/CSS), XML, CSS, SCSS/Less, GraphQL, Python, Ruby, PHP, Lua, Shell, YAML, TOML, INI, SQL, Protocol Buffers, Dockerfile, Makefile, Diff and Markdown (fenced code highlighted in its own language).
- Themes: 13 built in (Xcode, GitHub, One, Solarized, Catppuccin, Dracula, Monokai, Nord), with light/dark adaptive pairs. Themes are
Codable, and VS Code and TextMate themes can be imported. - Incremental highlighting:
HighlightSessionhandles editors and streamed text. An edit re-tokenizes only until line states converge. - Renderers: SwiftUI (
AttributedString,CodeView), UIKit/AppKit (NSAttributedString), HTML (inline styles, or classes plus generated light/dark CSS) and ANSI terminal output.
Requires Swift 6.1+ and iOS 16, macOS 13, tvOS 16, watchOS 9 or visionOS 1.