Editor Tooling
Hyperphp editor tooling is split into two layers:
- Tree-sitter grammar:
tools/tree-sitter-hyperphp - Pure PHP language server:
tools/hyperphp-lsp
Additional extension scaffolds:
- VS Code extension:
tools/extensions/vscode-hyperphp - Zed extension:
tools/extensions/zed-hyperphp
Language Identity
- language id:
hyperphp - file extension:
.hscpt
Tree-sitter
cd tools/tree-sitter-hyperphp
tree-sitter generate
tree-sitter test
LSP
Run manually over stdio:
php tools/hyperphp-lsp/bin/hyperphp-lsp
Supported methods in MVP:
initializeshutdownexittextDocument/didOpentextDocument/didChangetextDocument/didSavetextDocument/documentSymboltextDocument/completion(keywords, builtins, basic in-scope params/vars)
The server publishes parser/lexer diagnostics using Hyperphp error codes (HSxxxx).
Tell Model IntelliSense Dictionary
For application/model-aware completion, add:
.hyperphp/models.json
This repository already includes a starter dictionary at that path.
Supported structure:
{
"applications": {
"mail": {
"commands": ["sync"],
"properties": ["mailbox"],
"kinds": {
"message": {
"commands": ["mark_read"],
"properties": ["subject", "read status"]
}
}
}
}
}
Completion behavior:
- tell application " suggests application names from dictionary.
- inside tell application "app" suggests app commands/properties/kinds.
- inside nested tell <model> suggests that kind's commands/properties when inferable.
VS Code
- Open
tools/extensions/vscode-hyperphpas an extension project. - Run
npm install. - Launch extension host (
F5). - Open a
.hscptfile in a workspace wheretools/hyperphp-lsp/bin/hyperphp-lspexists.
Or from terminal:
cd tools/extensions/vscode-hyperphp
npm install
npm run dev:host
Smoke test:
cd tools/extensions/vscode-hyperphp
npm install
npm run smoke
Settings:
hyperphp.phpPathhyperphp.lspScriptPath
Zed
The scaffold includes language and LSP wiring in tools/extensions/zed-hyperphp.
You can point Zed's extension dev workflow at this folder and use the included
extension.toml and language config as the base package.
Current status: - Highlighting: implemented. - LSP diagnostics in Zed: not yet implemented in this scaffold.
Reason: - Zed language server command wiring is implemented via extension Rust/WASM APIs. - The current extension is declarative-only (no Rust/WASM bridge yet).