Skip to content

Releases: lynnswap/SyntaxEditorUI

v0.14.0

16 Jun 03:25
5006ef4

Choose a tag to compare

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

13 Jun 09:10
2cbdfac

Choose a tag to compare

SyntaxEditorUI v0.13.0

Improvements

  • Update ObservationBridge to v0.12.0 and adopt the new continuous observation token API across UIKit, AppKit, and Mini.

Migration Notes

  • Swift 6.3+ is now required. There are no SyntaxEditorUI public 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

11 Jun 14:53
0230895

Choose a tag to compare

SyntaxEditorUI v0.12.0

Breaking Changes

  • Rename SyntaxEditorColorTheme to SyntaxEditorTheme; update references to built-in presets and custom themes accordingly.
  • Rename SyntaxEditorModel.colorTheme and the colorTheme: initializer argument to theme and theme:.
  • Require custom SyntaxEditorTheme values to provide a font. Editor font size now comes from the theme, with fontSizeDelta applied 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.0 migration section in README.md for the exact API rename and custom theme font requirements.

Full Changelog: v0.11.0...v0.12.0

v0.11.0

06 Jun 21:10
aa0ce5d

Choose a tag to compare

SyntaxEditorUI v0.11.0

Breaking Changes

  • Replace the separate SyntaxEditorDocument and SyntaxEditorConfiguration API with SyntaxEditorModel, which now owns text, selection, language, editability, wrapping, theme, background drawing, and font-size state.
  • Remove textSnapshot() and SyntaxEditorDocumentChange. Read, write, and observe model.text directly, use model.replaceText(_:selectedRange:), and inspect SyntaxEditorTextChange.kind.
  • Replace SyntaxEditor(document:configuration:), SyntaxEditorView(document:configuration:), and SyntaxEditorViewController(document:configuration:) with the model-based initializers.
  • On macOS, remove public access to the underlying NSTextView through SyntaxEditorView.textView and SyntaxEditorViewController.textView. Drive editor state through SyntaxEditorModel or the public SyntaxEditorView properties.

New Features

  • Add SyntaxLanguage.plainText for 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.0 migration section in README.md for the full API replacement list and macOS NSTextView removal guidance.

Full Changelog: v0.10.1...v0.11.0

v0.10.1

29 May 05:26
4ca1dce

Choose a tag to compare

SyntaxEditorUI v0.10.1

Improvements

  • Update ObservationBridge to v0.11.0 and 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

28 May 10:13

Choose a tag to compare

SyntaxEditorUI v0.10.0

New Features

  • Add SyntaxEditorConfiguration.fontSizeDelta plus increaseFontSize(), decreaseFontSize(), and resetFontSize() for Xcode-style editor font size control on iOS and macOS.
  • Add SyntaxEditorMenu builders for installing an Editor menu 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.font public iOS API. Use SyntaxEditorConfiguration.fontSizeDelta or the font-size command methods instead.
  • Remove the unavailable SyntaxEditorColorTheme.xcode alias. Use SyntaxEditorColorTheme.default, .default, or SyntaxEditorColorTheme.preset(_:).

Improvements

  • Update ObservationBridge to v0.10.1.

Full Changelog: v0.9.0...v0.10.0

v0.9.0

27 May 10:16
b76c502

Choose a tag to compare

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

27 May 03:44
982b31e

Choose a tag to compare

SyntaxEditorUI v0.8.2

Bug Fixes

  • Improve Objective-C highlighting for property declarations, self member 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: SyntaxEditorDocument and SyntaxEditorConfiguration are the sources of truth, while native views/controllers render observed state directly.
  • Update ObservationBridge to 0.10.0.

Compatibility

  • SyntaxEditorViewController and macOS SyntaxEditorView no longer conform to Observable. Observe SyntaxEditorDocument and SyntaxEditorConfiguration directly for semantic state.

Full Changelog: v0.8.1...v0.8.2

v0.8.1

25 May 03:55

Choose a tag to compare

SyntaxEditorUI v0.8.1

Bug Fixes

  • Fix SwiftPM resolution for clients that depend on SyntaxEditorUI as a stable version by replacing the transitive tree-sitter-swift revision pin with the versioned lynnswap/tree-sitter-swift v0.1.0 tag.

Compatibility

  • No public SyntaxEditorUI API changes are included in this release.

Full Changelog: v0.8.0...v0.8.1

v0.8.0

25 May 01:30

Choose a tag to compare

SyntaxEditorUI v0.8.0

Breaking Changes

  • Remove SyntaxEditorColorTheme.xcode. Use SyntaxEditorColorTheme.default, shorthand .default, or SyntaxEditorColorTheme.preset(_:) instead.
  • Change SyntaxEditorColorTheme.id from UUID to String. 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.0 migration notes for the breaking theme API changes.
  • Add Xcode highlighting research and alignment notes for Swift and Objective-C behavior.

Compatibility

  • Update ObservationBridge to 0.9.1.
  • Pin tree-sitter-swift to the lynnswap/tree-sitter-swift revision used for the Swift semantic highlighting work.

Full Changelog: v0.7.0...v0.8.0