Skip to content

v0.11.0

Choose a tag to compare

@lynnswap lynnswap released this 06 Jun 21:10
· 85 commits to main since this release
aa0ce5d

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