Skip to content

0.1.0#1

Merged
math3usmartins merged 2 commits into
mainfrom
0.1.x
Jun 14, 2026
Merged

0.1.0#1
math3usmartins merged 2 commits into
mainfrom
0.1.x

Conversation

@math3usmartins

Copy link
Copy Markdown
Member

No description provided.

math3usmartins and others added 2 commits June 14, 2026 10:04
…oling

Initial implementation of the xphp VS Code extension (a superset of PHP):

- Language client over LSP/stdio with layered server resolution
  (xphp.server.command -> xphp.server.path -> ./server/*.phar -> pinned
  release download into globalStorage with SHA-256 verification); the
  language server is pinned to v0.2.4.
- TextMate grammar reusing VS Code's PHP grammar, plus an injection grammar
  that scopes xphp generics (turbofish `Type::<...>` and bare `Name<...>`)
  so they are no longer mis-parsed as HTML tags; heuristics avoid matching
  comparison/shift operators.
- GitHub Actions release workflow: on a v* tag, build the .vsix and create or
  update that tag's release (release name == tag name) with the asset attached.
- Package contents controlled by a package.json `files` allowlist (no
  .vscodeignore), shipping only dist/extension.js, the grammars, the icon,
  language-configuration.json, LICENSE and CHANGELOG.
- Docs (README/CONTRIBUTING/CHANGELOG) covering requirements, the server
  resolution order, and all xphp.* settings.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Quality gate so a grammar regression or packaging mistake can't reach main:

- .github/workflows/ci.yml: on every pull request and on pushes to main, run
  check-types, build, the grammar tests, and a package-contents check.
- Grammar regression tests (test/grammar/) tokenize via vscode-textmate +
  vscode-oniguruma over vendored, pinned VS Code PHP/HTML grammars
  (test/fixtures/grammars/, from vscode 1.124.2). They assert turbofish and
  bare/nested/bounded/defaulted generics scope correctly, reject comparison and
  shift false-positives, and pin that the invalid.illegal HTML scope (the bug
  the injection suppresses) never returns. Verified to go red on the real
  regressions (wrong injection selector; source-map leak).
- scripts/check-package-contents.mjs guards the package.json `files` allowlist:
  required assets present, and no node_modules / *.map / *.ts / src / scripts /
  test leak into the .vsix.
- package.json: add test, test:grammar and package:check scripts, plus
  vscode-textmate and vscode-oniguruma devDependencies; the Marketplace
  description now notes the language server series (0.2.x) over LSP.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@math3usmartins math3usmartins merged commit 25e47a3 into main Jun 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant