textkit

Community

Build high-performance custom text editors

AuthorAutisticAF
Version1.0.0
Installs0

System Documentation

What problem does it solve?

TextKit 2 introduces a viewport-based, composable text layout system that scales to large documents but exposes rough edges, platform inconsistencies, and missing glyph-level APIs; this Skill helps designers and engineers reason about the API, diagnose behavior, and implement robust custom text views and editors.

Core Features & Use Cases

  • Viewport-based layout: patterns for using NSTextLayoutManager, NSTextViewportLayoutController, and NSTextContentStorage to efficiently layout and render only visible text.
  • Custom rendering and annotations: guidance for subclassing NSTextLayoutFragment and integrating fragment views for line numbers, highlights, and overlays.
  • Editing concerns and workarounds: practical fixes for selection reset, extra fragment filtering, IME edge cases, multi-cursor replacement, and when to fall back to CoreText for glyph-level needs.
  • Migration guidance: side-by-side mappings from TextKit 1 to TextKit 2 and decision criteria for when to migrate or mix approaches.
  • Production reference: lessons and plugin patterns drawn from STTextView for building extensible, maintainable editors.

Quick Start

Ask for a step-by-step plan to implement a custom TextKit 2 editor with line numbers, syntax highlighting, multi-cursor support, and selection workarounds.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: textkit
Download link: https://github.com/AutisticAF/claude-code-apple-dev-plugin/archive/main.zip#textkit

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.