turbo-editors/turbo-corepublic Fork 0
fe2328870c726beecc5bc34fd3d05acba9fec94f
Commits
Clone
git clone https://git.rickub.com/turbo-editors/turbo-core.git
git clone ssh://git@rickub.com/turbo-editors/turbo-core.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

README.md · 96 lines · 4.3 KBmarkdown Blame HistoryRaw
🛟 Updated. 28d5985 k33g yesterday1# turbo-core
2
3The library every Turbo editor is built on.
4
5turbo-core is a Turbo C-style terminal IDE with a hole where the language goes: a menu bar, movable overlapping windows, modal dialogs, mouse support, loadable TOML themes, completion over LSP, terminal windows running a real shell, per-project settings, a project tree, snippets, and a menu of the commands a project runs on itself. None of it knows what language is being edited.
6
7An editor built on it is a command, a `profile.Profile`, and a scanner:
8
📦 Turbo Core f3ade8d k33g yesterday9- **[Turbo Go](https://rickub.com/turbo-editors/turbo-go)** — `rickub.com/turbo-editors/turbo-go`
10- **[Turbo Rust](https://rickub.com/turbo-editors/turbo-rust)** — `rickub.com/turbo-editors/turbo-rust`
11- **[Turbo Python](https://rickub.com/turbo-editors/turbo-python)** — `rickub.com/turbo-editors/turbo-python`
12- **[Turbo MoonBit](https://rickub.com/turbo-editors/turbo-moonbit)** — `rickub.com/turbo-editors/turbo-moonbit`
13- **[Turbo Golo](https://rickub.com/turbo-editors/turbo-golo)** — `rickub.com/turbo-editors/turbo-golo`
14- **[Turbo JS](https://rickub.com/turbo-editors/turbo-js)** — `rickub.com/turbo-editors/turbo-js`
🛟 Updated. 28d5985 k33g yesterday15
16## The whole of the difference
17
18```go
19profile.Profile{
20 Name: "Turbo Rust",
21 Slug: "turbo-rust",
22 Language: "Rust",
23 ToolsMenu: "Rus~t~",
24 RootMarkers: []string{"Cargo.toml"},
25 Server: profile.Server{
26 Command: "rust-analyzer",
27 InstallHint: "rustup component add rust-analyzer",
28 Dirs: []string{cargoBinDir()},
29 },
30 Templates: profile.Templates{Settings: , Snippets: , Tools: },
31}
32```
33
34That, plus `syntax.Register` for the colouring, is everything Turbo Rust is that Turbo Go is not.
35
36## Getting started
37
38[Build an editor](docs/en/tutorials/build-an-editor.md) walks through a working IDE for a language of your own, in about eighty lines. It has been run start to finish.
39
40```bash
📦 Turbo Core f3ade8d k33g yesterday41go get rickub.com/turbo-editors/turbo-core
🛟 Updated. 28d5985 k33g yesterday42```
43
44Go 1.26.5 or later.
45
46## What is in it
47
48Sixteen packages. Dependencies run strictly downwards, with no cycles and no interface indirection introduced to prevent one.
49
50| Package | What it holds |
51| --- | --- |
52| `profile` | The editor's identity: name, slug, language server, starter templates |
53| `buffer` | The text of one file: lines of runes, cursor, selection, undo, search |
54| `projectfile` | Atomic writes of a project's own TOML files |
📦 Turbo Core — files rewritten outside reload into their windows; the agent window wraps what you type and keeps a long paste aside as a token (#28); configrepo fetches a shared .turbo-<slug> from a forge URL (#25) fe23288 k33g 9h ago55| `configrepo` | A shared `.turbo-<slug>` directory fetched from a repository URL — rickub, GitHub, GitLab, Codeberg — by a shallow git clone |
🛟 Updated. 28d5985 k33g yesterday56| `version` | What build of itself a binary is |
57| `lsp` | LSP framing, JSON-RPC 2.0, the child process |
58| `theme` | TOML into tcell styles; eleven embedded themes plus the user's own |
59| `syntax` | Colouring for eight shared languages, the registry an editor adds its own to, and the scanner toolkit |
60| `settings` `snippets` `tools` | A project's own three files |
61| `ui` | Turbo Vision widgets: painter, desktop, window, menu, dialog, controls |
62| `editor` | The editing widget: viewport, scrolling, keys, mouse |
63| `terminal` | A shell in a window: pty, VT/ANSI emulator, the widget |
64| `filetree` | A project's files as an expandable tree |
65| `app` | Assembly: menus, dialogs, event routing, completion, the server's lifecycle |
66
67Each has a `README.md` of its own. The dependency graph is drawn in [`docs/diagrams/packages.drawio`](docs/diagrams/packages.drawio).
68
69**Three third-party dependencies**: `tcell/v2` for the terminal, `BurntSushi/toml` for every configuration file, and `golang.org/x/sys` for the pty ioctls. The tokeniser, the JSON-RPC client, the LSP framing and the VT emulator are hand-written.
70
71## Build and test
72
73```bash
74make test # the whole suite — the single documented command
75make race # the same under the race detector
76make cover # statement coverage per package
77make check # fmt, vet and test — what a commit should pass
78make help # every target
79```
80
81Quality gate, separate from the tests:
82
83```bash
84python3 ~/.claude/skills/quality/scripts/quality_report.py --workspace .
85```
86
87## Documentation
88
89Full documentation in **English** and **French**, following [Diátaxis](https://diataxis.fr):
90
91- [English](docs/en/README.md) — tutorial, five how-to guides, four reference pages, two explanations
92- [Français](docs/fr/README.md) — le même, en français
93
94## Licence
95
96MIT. See [LICENSE](LICENSE).