Zalliant Ethernize — VS Code
Language support for .weave and .pulse.php, based on the actual Ethernize parser and Pulse runtime inspected on 2026-10-21.
- TextMate highlighting: HTML, Weave expressions, six supported directives, PascalCase components, slots, bound attributes and Pulse attributes. Pulse embeds the built-in PHP grammar.
- Contextual suggestions: type
@ in template text or pulse: inside an opening tag. Suggestions stay out of PHP, comments, scripts, styles and quoted attribute values.
- Snippets:
w-if, w-each, w-props, w-expression, w-component, w-slot, w-bound, w-form and p-* Pulse attributes. Use Insert Snippet to browse them.
- Optional Ethernize Obsidian theme, selected through Preferences: Color Theme. Other editor themes work normally.
- Diagnostics from a bundled, unmodified snapshot of the official parser: block nesting, expressions, directives, component/slot structure and single-file format. No application code or project autoloader is executed.
Run locally
- Install Node.js 20+ for extension development and run
npm ci, then npm run compile in this directory.
- Open this folder in VS Code 1.85+ and press F5, selecting Run Ethernize Extension.
- In the Extension Development Host, open
examples/welcome.weave or examples/Counter.pulse.php. The status bar should display Weave or Pulse. Traditional component classes remain ordinary PHP files; their separate .weave templates use Weave support.
- For diagnostics, use PHP 8.2+ on PATH or set
"ethernize.phpPath": "C:\\xampp\\php\\php.exe" in user settings. Diagnostics require a trusted workspace. Check Output → Ethernize if PHP cannot start. Disable with ethernize.diagnostics.enabled.
Node is only a development tool for this extension; it is not required by Ethernize applications. The already compiled out/ is available in this working folder.
Tests and maintenance
npm test compiles and runs the TextMate tokenization, completion context and official parser tests. PHP must be available; PHP_PATH can select the executable for tests. Grammar tests use the installed VS Code HTML/PHP/JS/CSS grammars; set VSCODE_EXTENSIONS_PATH to VS Code's resources/app/extensions directory when it is not discovered automatically on Windows.
The real Extension Host suite is tests/host/index.cjs. Run:
code --extensionDevelopmentPath="$PWD" --extensionTestsPath="$PWD\tests\host" --user-data-dir="$PWD\.tools\vscode-profile" --extensions-dir="$PWD\.tools\vscode-extensions" --disable-workspace-trust
The suite checks activation, both file associations, directive/attribute completions and parser diagnostics. Use an isolated test profile as above. tests/host writes its success report under .tools/.
Mission validation: TypeScript compilation and all 15 automated tests passed (including activation against a simulated VS Code API, real TextMate grammars and the real PHP parser). The real Extension Host suite could not start because the installed VS Code reported an update in progress; it remains to be run after that update finishes.
Edit src/catalog.json for directive, attribute and snippet metadata; npm run generate rebuilds grammars/snippets. Parser provenance and update guidance: resources/parser/NOTICE.md (included in the extension, alongside resources/parser/LICENSE). The optional theme is under themes/.
Current limits
- Syntax support follows the shipped parser snapshot; future framework changes require an update.
- Diagnostics require PHP, report the first official parser error and skip documents larger than 500,000 UTF-16 code units. Missing PHP disables validation while highlighting/snippets/completions remain available.
- No application execution, component registry resolution, PHP language server, inferred property/action completion or runtime validation. PHP coloring uses VS Code's built-in grammar; full PHP tooling remains the responsibility of PHP extensions.
- Only
.weave and .pulse.php are associated; ordinary .php files keep their existing association. Single-file Pulse currently means one named PHP class followed by ?> and Weave markup.
- No Marketplace publication, commits or pushes are part of this mission.
The application files originally present in this directory are preserved. Their original README follows.
Ethernize application
A small, working Ethernize application. Experimental beta: the API can change between betas, so do not use it in production yet.
Portuguese version: README.pt-BR.md (in the development source folder).
Requirements
- PHP 8.2 or newer with the
filter, hash, json, mbstring, ctype and pdo extensions
- Composer 2
- No Node.js
Start
composer create-project zalliant/ethernize my-project --stability=beta
cd my-project
php ethernize run
Open the address it prints (http://127.0.0.1:8000). The page you see is rendered by Weave from apps/app/resources/views/pages/welcome.weave.
Commands
php ethernize run # development server of the only application
php ethernize run app --port=9000 # a named application on another port
php ethernize help # list commands
php ethernize --version
run starts PHP's built-in server for development only, with APP_ENV=local and debug on. It listens on 127.0.0.1 and stops with Ctrl+C. Applications are the folders inside apps/ that have a public/index.php; add another folder there and run finds it. Default ports: 8080 for aether, 8081 for website, 8000 for any other name.
What is here
apps/app/
public/index.php the only file the web server exposes
routes/web.php routes (controller classes, not closures)
src/Controllers/ your code, namespace App\
resources/views/ Weave templates
config/ configuration (one file per area)
.env environment (created from .env.example; never commit it)
var/ cache, sessions and other runtime files (not committed)
ethernize the command line
bin/manifest.php builds the Manifest for production
bin/strata.php database migrations (when Strata is enabled)
The framework itself lives in vendor/zalliant/. You never edit it.
Modules
Ethernize is modular. Only Weave is on. The others are installed but not started until you list them in apps/app/config/app.php:
| Module |
Provider |
For |
| Pulse |
Ethernize\Pulse\PulseProvider |
reactive components driven by the server |
| Strata |
Ethernize\Strata\StrataProvider |
database access and migrations |
| Shield |
Ethernize\Shield\ShieldProvider |
sessions, login, authorization, CSRF |
Shield never turns authentication on by itself. You protect routes explicitly. Without it, no session is created and no cookie is sent. Pulse needs a signing key outside local development (PULSE_KEY, see .env.example). Each module has a ready-to-edit file in apps/app/config/.
Production checklist
- Copy only the files, run
composer install --no-dev --optimize-autoloader.
- Create
.env outside version control with APP_ENV=production, APP_DEBUG=false, your APP_URL and TRUSTED_HOSTS.
- Point the web server at
apps/app/public, nothing else.
php bin/manifest.php build, then php bin/manifest.php check, and run with the process environment variable APP_MANIFEST=required.
- Reload PHP so OPcache drops the old files.
Updating
composer update "zalliant/*". Read the release notes first: during the beta, minor versions can change the API.