Evolving a Structural Code Editor: From AST Manipulation to Intuitive UI

2025-01-06

This post details the multi-year evolution of a structural code editor. The initial version directly manipulated the Abstract Syntax Tree (AST), proving cumbersome. Subsequent iterations simplified the AST and explored a text-cursor-based approach, but both fell short. The final version balances AST and text editing, employing techniques like Editable types, Projections, and Frames. A visual, icon-based UI was added, supporting keyboard, mouse, touch, and remote control, significantly enhancing user experience. Built with Gleam and Lustre, this project showcases the ongoing exploration and refinement of structural code editor design.

Read more
Development code editor UI design