Why I Wrote Another Markdown Editor
Oh no, not another Markdown viewer and editor. I keep notes and reports as Markdown in Git, usually with several project folders open at once, and I needed a compiled report whose pages match the file I hand over. I wrote Lens for that job, and the source is now on GitHub.
What I needed
The work sits in projects. I move between a few of them in a day, and I do not want to close one folder to see another. Lens keeps a library of project folders open in one window, and it lists the documents by their Markdown headings.
The other half of the job is the report I actually send. I want a typographic, compiled page, laid out from a template, where the same sources and the same template produce the same pixels. In Lens, Typst compiles the project’s Markdown through that template and writes a PDF. The preview shows the pages of that PDF.
Zettlr, for a long time
Zettlr was my daily editor for a long time. I learned a lot from it, and I prefer it to Obsidian and the other editors I have tried. It is a serious publication workbench. Lens takes its lead from Zettlr. Several folders stay open, and a report goes out through a chosen template.
On my machine it was often slow. It would choke on directories with node caches and the like. Indexing a large library could get in the way of the work. Change detection was uneven, so I was never quite sure the tree still matched the disk. And I never felt sure when it would crash and leave me making remedial edits to a config file before I could continue. I still think highly of Zettlr. Speed is a reason Lens exists. In use, Lens is neck-jerkingly fast.
Lens does not open generated trees such as node_modules, .git and build caches. The file tree lists one folder at a time, hides gitignored names by default, and caps a large listing. The search index does not open those directories.
It watches the open file and the folders in the tree, and it waits for a burst of writes to settle before it reloads. A clean buffer adopts the new bytes. A dirty buffer asks. It also keeps a lexical index over the Markdown in the open projects, so a search can rank titles, headings and body text without a separate database. The notes on disk stay the source.
There is a handy terminal built in, so a shell sits next to the note.
The window I wanted
Obsidian and Zettlr are both built on Electron. Their own documentation says so, and Zettlr's is written in TypeScript. Electron let those teams ship a capable editor on every major desktop. I have a general dislike of that stack. I want a small native OS window that starts quickly and draws on the GPU.
So I wrote Lens in Go, on the GoGPU toolkit. GoGPU opens a native OS window and draws the shell, the Markdown, and the report pages on that surface. On my Mac it uses Metal. The app is early, and the toolkit is early too. It is already pleasant to use for the work I built it for.
Why Go
TypeScript would have been the natural language if I had stayed with an Electron shell. I wanted the language and the window to stay small together. Go has a small control surface and a predictable shape. It compiles almost instantly. The models I work with already know it well.
Rust was a genuine option, and I take it seriously. Its compiler will refuse a whole class of memory mistakes before a program runs. For a desktop Markdown editor, I judged the extra complexity more than I needed. In my experience the build output of Rust projects also tends to grow huge. The extra runtime speed would not have been worth it here.
A local connection for an assistant
Lens also speaks the Model Context Protocol on the same machine. It listens only on the local loopback interface, behind a bearer token, and the address stays put across launches. The card in the app is plain about that. This machine only.
An assistant can call a tool named document to read the focused note. That snapshot includes the path, title, dirty state, editing mode, caret, selection or current line, outline, open tabs, a window of lines around the caret, and the full text. A second tool, apply_edit, can replace the whole document or a span of it. The change is one undo step, and it stays unsaved in the buffer. That tool does not write the file. If the assistant writes the file itself, the watcher picks it up in the usual way.
A little unusual
I would not claim Lens is the only Markdown editor worth using. Obsidian and Zettlr cover a lot of ground, and both have large, skilled communities. What I think is a little unusual is the combination in one small app. A project library stays open. The report you see is a Typst PDF compile. The shell is a Go program drawn on the GPU. And an assistant on the same machine can read and edit the note you are actually writing. Word is there too, as a separate Pandoc export, for the times when a .docx is what the recipient needs.
It is early. The app reports itself as 0.1.0. I am sharing the source because I use it for my own writing.
Lens is MIT licensed, so you are welcome to use it and fork it.
What’s next
A browser build is in progress, compiled to WASM. Today, make wasm-serve opens the shared Lens shell in a WebGPU-capable browser. The project tree, tabs, Formatted and Raw views, the outline, split panes and search are there, and a tracked Markdown file can be saved back to the checkout. The terminal and the local MCP connection stay on the desktop.
I am considering authentication for shared documentation workspaces. That is just an experiment at the moment.
Getting Lens
The repository is github.com/Pairti-Pty-Ltd/lens. The published install path is for macOS. With Go 1.27.4 or later and Make installed, this builds the binary:
make binary
./build/pairti-lense
Lens downloads its own pinned copies of Typst, Pandoc and Poppler, and can be installed with Homebrew: brew install pairti-pty-ltd/tap/lens.
To install the application bundle from source in ~/Applications/Lens.app, run make app. You can then launch Lens from Spotlight.
Fitting tools to the work is part of my work at Pairti. Start with a Diagnostic.
Sources
- Pairti, Lens repository (public, accessed 28 November 2026):
https://github.com/Pairti-Pty-Ltd/lens - Obsidian Help, Update Obsidian (desktop installer updates are “the version of Electron, the framework on which Obsidian is built”; accessed 28 November 2026):
https://obsidian.md/help/updates - Zettlr, Zettlr repository README (“Zettlr is an Electron-based app”; tech stack includes TypeScript, Electron, Vue, and Node.js; accessed 28 November 2026):
https://github.com/Zettlr/Zettlr - Zettlr Documentation, Setup (“Zettlr supports all operating systems that its underlying framework, Electron, supports”; accessed 28 November 2026):
https://docs.zettlr.com/en/getting-started/setup.html - GoGPU, GoGPU organisation (UI toolkit used by Lens; accessed 28 November 2026):
https://github.com/gogpu - Typst, Typst (compiler Lens uses for PDF reports; accessed 28 November 2026):
https://typst.app/