Skip to content

gogpu/editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

GoGPU Logo

gogpu/editor

Pure Go Text/Code Editor Widget
GPU-accelerated, embeddable, zero CGO.

License Go Version


Overview

gogpu/editor is a reusable native text and code editor widget for Go — like Monaco Editor but for Go desktop and WASM applications. GPU-accelerated rendering via gogpu/gg, widget system via gogpu/ui.

Key Goals

  • Embeddable — drop into any Go application as a widget
  • GPU-accelerated — glyph atlas, ClearType LCD, MSDF fallback
  • Pure Go — zero CGO, cross-compiles everywhere (Windows, macOS, Linux, WASM)
  • Code editor — syntax highlighting, line numbers, code folding
  • Rich text — multi-font, styled runs, WYSIWYG editing
  • IDE-ready — LSP client, DAP client, minimap, diagnostics

Status

🚧 Early development. Architecture defined in ADR-028 (internal).

Architecture

gogpu/editor/
├── document/     # PieceTable document model, undo/redo
├── layout/       # Text layout engine, line breaking, styled runs
├── view/         # Editor widget, gutter, cursor, selection, minimap
├── input/        # Keyboard, mouse, IME
├── syntax/       # Syntax highlighting (TextMate, Tree-sitter)
└── lsp/          # Language Server Protocol client (future)

Enterprise References

Editor Key Pattern What We Take
VS Code PieceTree document model Efficient insert/delete data structure
Monaco MVVM, decorations Separation of model, view, decorations
Scintilla Simple Model-View 25 years proven, portable
Zed GPU-accelerated, GPUI GPU text rendering patterns
CodeMirror 6 Immutable state, plugins Functional state management
Xi-editor Rope, async frontend-backend Data structure research
cosmic-text Pure Rust text layout Pure language text layout patterns

Ecosystem

Part of the gogpu Pure Go GPU ecosystem:

Repo Purpose
gogpu App framework, windowing
wgpu Pure Go WebGPU
gg 2D graphics, GPU text rendering
ui GUI toolkit
editor Text/Code editor widget ← you are here

Contributing

Contributions welcome! Architecture decisions and open questions are tracked internally. Join the discussion to participate.

License

MIT

About

Pure Go Text/Code Editor Widget — GPU-accelerated, embeddable, zero CGO. Like Monaco for Go.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors