osa1 github about atom

A text editor I worked on in 2021-2023

May 7, 2026 - Tagged as: en.

I was just going through old files and saw a cool video of an old project that I thought I should share.

In January 2021 I started working on a new text editor. Zed didn’t exist publicly at the time (it must’ve been under development) and two projects were getting a lot of hype:

Inspired by these two developments, I started implementing my own text editor. The renderer was similar to Alacritty: IIRC I even copied and modified its texture atlas generator that lazily generated glyphs. The renderer must’ve been similar too, though I’d written it myself. It only used OpenGL.

For language support I had different ideas. I used compiled lexers (instead of runtime-interpreted regexes like most editors and IDEs) for syntax highlighting. The editor didn’t care about the actual lexer generator used, but for Rust I used my own lexgen-based Rust lexer.

I had a few use cases for these lexers, but one of the cool ones was limiting search scope to lexical elements. In the video below I search for a term, then choose whether to match uses in string literals and comments:

I must’ve hated the existing regex-based language-agnostic search tools so much, a year before this I started another project for syntax-aware search: sg. sg uses tree-sitter grammars so adding new language support is trivial, and in principle we could even make it load tree-sitter grammars at runtime.