TextKit for the rest of us
summary
Explains how to build a real code editor with Text Kit by showing a working demo and the exact hooks to use: implement an NSTextStorage subclass that forwards to a smart code model and cache, run syntax coloring in processEditing after edits, override layout storage to offset lines for a left gutter, and draw numbers in drawBackgroundForGlyphRange; ships a GitHub demo and shows live syntax highlighting plus paragraph numbers so you can copy the code.
AI-written summary · about
