A real code editor for Android: LSP language servers, semantic autocomplete, TextMate syntax highlighting, multi-cursor editing, code navigation and inline diagnostics β all on your phone.
Most "code editors" on Android are glorified text boxes. They lean on Android's
TextView, choke on a 2,000-line file, and offer nothing that would make a real
developer trust them with production code. You get syntax colors if you're lucky,
and that's the end of it. So the moment a bug needs fixing on the go, you reach
for your laptop anyway.
Pocket Code takes the opposite approach. Its code editor for Android is built
on Sora Editor, a high-performance engine backed by a gap-buffer data
structure. Unlike TextView-based solutions, Sora avoids an O(n) copy on every
keystroke, so large files stay smooth. On top of that engine, Pocket Code layers
the things you'd expect from a desktop IDE: LSP language servers, semantic
autocomplete, real syntax highlighting, multi-cursor editing, and
deep code navigation. Here's what that actually looks like.
Highlighting is powered by TextMate grammars (the same .tmLanguage.json
format that VS Code uses), processed by the tm4e engine. That covers 33
languages out of the box β Kotlin, Java, Python, JavaScript, TypeScript (and
TSX), Go, Rust, C, C++, C#, PHP, Ruby, Swift, Scala, SQL, YAML, TOML, Dockerfile,
and more β each mapped to its proper TextMate scope and file extensions.
To keep the editor responsive on a phone, Pocket Code ships its own
IncrementalTokenizer that paints tokens instantly instead of waiting for
the full TextMate pass to finish. Around that you get the editor essentials that
make code readable: configurable line numbers, matching brace and parenthesis
indicators, visual indentation guides, and code folding for functions, classes,
methods, interfaces, comment blocks, import blocks, and custom regions β with
nested folds and a fold state that persists per file.
Language detection is automatic, by extension (CodeLanguage.fromExtension())
or by filename (CodeLanguage.fromFileName(), which recognizes Dockerfile,
Makefile, .gitignore and friends), falling back to plain text when nothing
matches.
This is where Pocket Code stops being a mobile toy and starts being an IDE. The
editor includes a full Language Server Protocol client β LspClient,
implementing LSP 3.17 β that connects to standard external language servers
(clangd, pyright, and others). Communication runs over JSON-RPC 2.0, with
full language-server lifecycle management and automatic reconnection if a server
drops.
That LSP client is what turns basic completion into real IntelliSense. Here are the eight capabilities it implements:
| LSP method | Feature |
|---|---|
textDocument/completion | Semantic autocomplete |
textDocument/hover | Documentation on hover |
textDocument/definition | Go to definition |
textDocument/references | Find references |
textDocument/signatureHelp | Function parameter hints |
textDocument/formatting | Server-assisted formatting |
textDocument/rename | Safe semantic rename |
textDocument/publishDiagnostics | Real-time server diagnostics |
The Sora engine also provides its own native floating autocomplete window, so you get completion even before wiring up a language server. And for AI-assisted writing, a Ghost Text layer renders suggestions as semi-transparent inline text after the cursor, with a 150 ms grace window before minor cursor movements dismiss it β accepting a suggestion inserts the full text while preserving your undo/redo history, and it never fights the standard autocomplete engine.
Typing code on a phone is only painful if the editor makes it painful. Pocket
Code's MultiCursorEngine lets you drop additional cursors at arbitrary
positions and edit every one of them simultaneously, with clean offset β
line/column conversion and the ability to remove individual cursors while the
rest stay active.
Emmet is fully supported for HTML and CSS: ul>li*3 expands to a nested
list, div.cls#id becomes <div id="id" class="cls"></div>, and CSS shorthands
like df β display: flex or w100p β width: 100% all work.
Because phone keyboards weren't designed for code, a programming symbol bar
sits above the system keyboard. One section inserts the characters you actually
need β { } [ ] ( ) ; : = and the rest β and another exposes
actions: undo/redo, move a line up or down, toggle line (//) or block (/* */)
comments, duplicate the current line, go to a line, sort selected lines, and
transform case (UPPER / lower / Title). Add pinch-to-zoom font sizing, a
magnifier on long-press for precise cursor placement, and unlimited
undo/redo, and the small screen stops being an excuse.
A real editor is judged by how fast you can move through a codebase. Pocket Code gives you the full navigation kit:
Ctrl+Shift+F.You don't always want to spin up a language server, so Pocket Code ships a local
InlineDiagnostics engine that catches problems in real time using
per-language rules β no LSP required. It carries rules for Kotlin, Java,
JavaScript/TypeScript, Python, Go, Rust, PHP, CSS, HTML and JSON.
Universal rules flag trailing whitespace, excessive consecutive blank lines, and
TODO / FIXME / HACK / NOTE / BUG / WARN comments. Language-specific
rules go further β Kotlin !! usage, JavaScript == instead of === or var
instead of let/const, Python inconsistent indentation and unused imports,
malformed JSON. Everything surfaces in a VS Code-style Problems panel,
grouped by file and filterable by severity (ERROR, WARNING, INFO, HINT).
Where it can, the editor fixes things for you. Quick fixes appear next to diagnostics β clean up trailing whitespace, remove blank lines, and apply language-specific actions. And extract refactorings analyze the variables in a selection to pull out a method (with the right parameters and call site) or wrap an expression into a named variable, auto-indented to the correct level.
Formatting is fully on-device β no external tooling, no network round-trip. Each language has its own formatter implementation:
| Formatter | Languages |
|---|---|
| C-style | Kotlin, Java, JS, TS, C, C++, C#, Dart, Go, Swift, Rust, PHP, Scala, Gradle |
| Python | Python (PEP-8 indentation) |
| XML/HTML | HTML, XML, SVG |
| JSON | JSON (pretty-print or compact) |
| CSS | CSS, SCSS, Less |
| YAML / SQL / Markdown | YAML, SQL, Markdown |
Per-profile options let you set indentation size, max line width, whether to add a trailing newline, spacing around operators, and brace placement.
The layout adapts across Phone Portrait, Phone Landscape, Tablet and Foldable form factors automatically. A Zen mode hides everything but the text, a split editor shows two files side by side, and contextual toolbar chips put Format, Find, Replace and Outline one tap away. Pretty much every action lives in an organized overflow menu, and there's an offline mode so editing, local execution and Git keep working with no connectivity.
One honest note: real-time collaboration is on the roadmap but not shipping yet. The collaboration panel exists as a UI prototype with no backend β cursor sync and shared sessions are planned, so we're not going to pretend they work today.
A phone is no longer an excuse to write code with a worse tool. Pocket Code's editor brings the parts that actually matter β LSP-backed autocomplete and IntelliSense, TextMate syntax highlighting across 33 languages, multi-cursor editing, and full code navigation β to the device that's always in your pocket.
Pocket Code is heading to Google Play. Join the pre-registration to be among the first to try it on your own device.