I started building Icarus in 2024 as a simple text editor, and honestly I never thought it could become anything more than that... (Spoiler: it did, over the course of the last two years I implemented what I will go through in this small article).
The motivation behind Icarus has always been my obsession of control over (almost) everything I run on my machine (I think it started with Casey's "Thirty Million Lines Problem" talk). I wanted an editor I could entirely keep in my head.
The general architecture is very direct. The app runs an event loop that polls input, mutates the editor state, renders from state and repeats. Most long-lived state hangs off one central editor object that owns the active tab, viewports, text buffers, syntax highlighter, intellisense, project model, console, and debugger.
The text engine is intentionally plain. Each line is a dynamic char array, and inserts/deletes rely on memmove. It’s not the best approach ever, but (in my experience) it keeps