Releases: lynnswap/SyntaxEditorUI
Releases · lynnswap/SyntaxEditorUI
v0.14.0
SyntaxEditorUI v0.14.0
New Features
- Added
SyntaxEditorModel.replaceContents(text:language:selectedRange:)for updating editor text, language, and selection together.
Improvements
- Preserves nearby syntax color and font styling for simple inserted text while asynchronous highlighting catches up, reducing typing-time highlight flicker on iOS and macOS.
Bug Fixes
- Cancels and replaces stale highlight requests so document and language replacements apply the latest syntax colors instead of letting older highlight work block or materialize later.
- Keeps in-flight semantic merge bookkeeping aligned when highlight work is superseded.
Full Changelog: v0.13.0...v0.14.0
v0.13.0
SyntaxEditorUI v0.13.0
Improvements
- Update
ObservationBridgetov0.12.0and adopt the new continuous observation token API across UIKit, AppKit, and Mini.
Migration Notes
- Swift 6.3+ is now required. There are no
SyntaxEditorUIpublic runtime API changes in this release.
Documentation
- Add README requirements for Swift 6.3+, iOS 18+, and macOS 15+.
Full Changelog: v0.12.0...v0.13.0
v0.12.0
SyntaxEditorUI v0.12.0
Breaking Changes
- Rename
SyntaxEditorColorThemetoSyntaxEditorTheme; update references to built-in presets and custom themes accordingly. - Rename
SyntaxEditorModel.colorThemeand thecolorTheme:initializer argument tothemeandtheme:. - Require custom
SyntaxEditorThemevalues to provide afont. Editor font size now comes from the theme, withfontSizeDeltaapplied relative to that theme font.
Improvements
- Move Swift and Objective-C semantic highlighting work off the typing path and keep incremental refreshes local to edited lines where possible, reducing latency for normal edits, large edits, and paste-sized updates.
- Rework highlight rendering around normalized color/font snapshots so UIKit and AppKit preserve visible syntax colors and fonts while async highlights, theme changes, and font-size changes settle.
- Improve Swift and Objective-C semantic refresh/indexing so declaration, scope, member, macro, typedef, and local-shadow edits refresh affected references without stale overlays.
Bug Fixes
- Keep UIKit/AppKit highlights valid after rapid edits, cancelled highlight work, EOF appends, CR line edits, multi-range edits, and theme/font changes.
- Preserve additional Objective-C semantic contexts, including block/function typedefs, macro argument types, method parameter types, fast enumeration types, nested typedefs, ivar types, and parenthesized typedefs.
Migration Notes
- See the
v0.12.0migration section inREADME.mdfor the exact API rename and custom theme font requirements.
Full Changelog: v0.11.0...v0.12.0
v0.11.0
SyntaxEditorUI v0.11.0
Breaking Changes
- Replace the separate
SyntaxEditorDocumentandSyntaxEditorConfigurationAPI withSyntaxEditorModel, which now owns text, selection, language, editability, wrapping, theme, background drawing, and font-size state. - Remove
textSnapshot()andSyntaxEditorDocumentChange. Read, write, and observemodel.textdirectly, usemodel.replaceText(_:selectedRange:), and inspectSyntaxEditorTextChange.kind. - Replace
SyntaxEditor(document:configuration:),SyntaxEditorView(document:configuration:), andSyntaxEditorViewController(document:configuration:)with the model-based initializers. - On macOS, remove public access to the underlying
NSTextViewthroughSyntaxEditorView.textViewandSyntaxEditorViewController.textView. Drive editor state throughSyntaxEditorModelor the publicSyntaxEditorViewproperties.
New Features
- Add
SyntaxLanguage.plainTextfor strict plain-text editing without syntax highlighting or code-aware editing transforms. - Add
SyntaxEditorHighlighting.prepare(_:)so apps can prewarm highlighting setup for expected languages before first editor display.
Improvements
- Reduce Swift and Objective-C typing/highlighting latency with faster semantic overlays, declaration indexing, fast-pass highlighting, and more local TextKit rendering work.
- Move the macOS editor to the direct TextKit 2 rendering path, matching the iOS architecture while preserving native selection, find navigation, scrolling, and edit commands.
- Improve Objective-C and Swift semantic highlighting accuracy for incremental declaration edits, shadowing, macros, member chains, comments, and parser invalidation ranges.
- Keep large paste, scroll, wrapping, and partial-highlight updates more responsive on iOS and macOS.
Bug Fixes
- Preserve IME/marked-text attributes, selection, undo state, and rendered syntax attributes across editor updates on iOS and macOS.
- Keep syntax colors stable during partial refreshes, cancelled highlight work, appearance changes, base foreground changes, and document replacements.
Migration Notes
- See the
v0.11.0migration section inREADME.mdfor the full API replacement list and macOSNSTextViewremoval guidance.
Full Changelog: v0.10.1...v0.11.0
v0.10.1
SyntaxEditorUI v0.10.1
Improvements
- Update
ObservationBridgetov0.11.0and adopt explicit observation tracking for editor configuration and document state. - Prevent document changes from retriggering configuration observation on iOS and macOS.
Full Changelog: v0.10.0...v0.10.1
v0.10.0
SyntaxEditorUI v0.10.0
New Features
- Add
SyntaxEditorConfiguration.fontSizeDeltaplusincreaseFontSize(),decreaseFontSize(), andresetFontSize()for Xcode-style editor font size control on iOS and macOS. - Add
SyntaxEditorMenubuilders for installing anEditormenu with structure, font size, and line wrapping commands on UIKit and AppKit.
Bug Fixes
- Update selected macOS editor text immediately when font size commands change the rendered font.
- Keep syntax-highlighted fonts and cached highlights in sync after font size changes.
Migration
- Remove the unavailable
SyntaxEditorView.fontpublic iOS API. UseSyntaxEditorConfiguration.fontSizeDeltaor the font-size command methods instead. - Remove the unavailable
SyntaxEditorColorTheme.xcodealias. UseSyntaxEditorColorTheme.default,.default, orSyntaxEditorColorTheme.preset(_:).
Improvements
- Update
ObservationBridgetov0.10.1.
Full Changelog: v0.9.0...v0.10.0
v0.9.0
SyntaxEditorUI v0.9.0
New Features
- Add
SyntaxEditorConfiguration.drawsBackground, allowing apps to let surrounding UI draw the editor background while preserving syntax colors and editor decorations.
Bug Fixes
- Avoid UI stalls when applying syntax highlighting to large, minified, or high-token-density files on iOS and macOS.
- Preserve correct syntax colors and base styling when plain or missing-style tokens split highlighted ranges.
Full Changelog: v0.8.2...v0.9.0
v0.8.2
SyntaxEditorUI v0.8.2
Bug Fixes
- Improve Objective-C highlighting for property declarations,
selfmember chains, enum typedefs, wrapped expressions, comments, casts, uppercase names, and incremental overlay cleanup. - Improve CSS highlighting for modern at-rules, container queries, pseudo selectors/functions, keyframes, signed dimensions, nested conditional selectors, embedded HTML style blocks, and stale overlay cleanup.
- Preserve Swift rendered semantic tokens in the editor spec tooling.
Improvements
- Align UIKit/AppKit editor owners with native Observation rendering:
SyntaxEditorDocumentandSyntaxEditorConfigurationare the sources of truth, while native views/controllers render observed state directly. - Update ObservationBridge to
0.10.0.
Compatibility
SyntaxEditorViewControllerand macOSSyntaxEditorViewno longer conform toObservable. ObserveSyntaxEditorDocumentandSyntaxEditorConfigurationdirectly for semantic state.
Full Changelog: v0.8.1...v0.8.2
v0.8.1
SyntaxEditorUI v0.8.1
Bug Fixes
- Fix SwiftPM resolution for clients that depend on
SyntaxEditorUIas a stable version by replacing the transitivetree-sitter-swiftrevision pin with the versionedlynnswap/tree-sitter-swiftv0.1.0tag.
Compatibility
- No public SyntaxEditorUI API changes are included in this release.
Full Changelog: v0.8.0...v0.8.1
v0.8.0
SyntaxEditorUI v0.8.0
Breaking Changes
- Remove
SyntaxEditorColorTheme.xcode. UseSyntaxEditorColorTheme.default, shorthand.default, orSyntaxEditorColorTheme.preset(_:)instead. - Change
SyntaxEditorColorTheme.idfromUUIDtoString. Apps that store or compare theme IDs should migrate those values to strings.
New Features
- Add bundled editor color presets with appearance-aware light/dark resolution and token font styles.
- Add Xcode-aligned semantic highlighting for Swift and Objective-C, including Swift file-local symbol overlays and Objective-C reference token handling.
- Add canonical highlight queries across the built-in languages so CSS, HTML, JavaScript, JSON, Objective-C, Swift, TOML, and XML resolve through the same editor syntax families.
Bug Fixes
- Keep semantic highlight refresh ranges local to edits and reset stale highlight state when the source or language changes.
- Preserve fallback token font families and apply bundled base fonts consistently.
- Reduce syntax highlight flicker and stabilize macOS selection repainting.
Documentation
- Add
v0.8.0migration notes for the breaking theme API changes. - Add Xcode highlighting research and alignment notes for Swift and Objective-C behavior.
Compatibility
- Update
ObservationBridgeto0.9.1. - Pin
tree-sitter-swiftto thelynnswap/tree-sitter-swiftrevision used for the Swift semantic highlighting work.
Full Changelog: v0.7.0...v0.8.0