The kits in editors/ give PAD templates highlighting, completion and snippets
in Sublime Text, VS Code, Vim, Emacs, Kate, BBEdit and Notepad++. An editor that speaks the
Language Server Protocol - Neovim, Helix, Zed, Emacs with eglot, Sublime Text with LSP - runs
editors/lsp/pad-lsp.js, a Node server without dependencies.
{/ the tags still open.editors/render.php), and the error lands on the tag it names. A _inits.pad is checked through the index page of its directory; a snippet in _include or _tags has no page of its own and is not rendered.docs/reference for the tag, function, option, property or type prefix under the cursor; on an application's own tag or function, the comment at the top of its file; on a field, the line that assigns it.{badge} to the nearest _tags/badge.* up the directories, then _common, then the engine; {include:footer} to _include/footer.pad; | money to _functions/money.php; callback='x' to _callbacks/x.php.Page pairing makes one more jump possible: from a field in the template to the line of
the paired .php that assigns it. Here, go to definition on {$total}
lands on $total = 42;.
|
PHP fragments/editor_support_1.php |
HTML fragments/editor_support_1.pad |
Result |
|---|---|---|
|
|
Total: 42 |
editors/tree-sitter-pad is a Tree-sitter grammar: native highlighting in Zed,
Helix and Neovim, with the HTML around the tags highlighted as HTML. A pair of tags is one
node of the tree, so an editor can fold {orders} ... {/orders},
select it, or select just what is inside it. Whether a tag is a pair is decided as the engine
decides it: {orders} opens a block only when a {/orders}
closes it further on, so {else} and {echo $x} stay
single tags.
editors/mcp/pad-mcp.js is an MCP server: an assistant such as Claude Code asks
the engine itself instead of relying on what it remembers. It renders a page, or a template
that exists in no file yet - given variables of its own when no PHP should run - and runs the
strict syntax check on it; it traces a request, runs PHP in a booted application, renders the
same template on the engine of an older commit to show what a change changed, runs one
regression test, one suite or all of them, lists the applications, their pages and the
built-ins, and looks a tag or function up in the reference. Register it with
claude mcp add pad -- node editors/mcp/pad-mcp.js.
For Claude Code, editors/claude is a plugin with all of it in one install: the
language server above - after every edit of a page Claude gets PAD's own error, without asking
for it - the MCP server, and a skill on hunting, proving and fixing a bug in PAD. Install it
with claude plugin marketplace add editors/claude and
claude plugin install pad@pad.