Use TextMate highlighting in component fixtures - #335568
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
An undefined variable breaks compilation, fixtures receive the wrong token theme, and a test leaks global palette state.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: 1
New issues introduced by this change (3)
| Severity | Finding |
|---|---|
src/vs/workbench/test/browser/componentFixtures/fixtureUtils.ts — Undefined disposable store breaks theme loading |
|
src/vs/workbench/test/browser/componentFixtures/fixtureSyntaxHighlighting.test.ts — Restore the token palette after this test |
|
src/vs/workbench/test/browser/componentFixtures/fixtureUtils.ts — Load the Dark 2026 palette instead of Dark Modern |
What changed in this PR
Adds real TextMate syntax highlighting to component fixtures using shipped grammars and Oniguruma.
Changes:
- Registers fixture languages and shared tokenizers.
- Adds theme-scoped token CSS and synchronous model tokenization.
- Adds resource loading and tokenizer lifecycle tests.
| File | Description |
|---|---|
fixtureUtils.ts |
Integrates syntax highlighting into fixture setup. |
fixtureSyntaxHighlighting.ts |
Implements shared TextMate tokenizer registration and styling. |
fixtureSyntaxHighlighting.test.ts |
Tests tokenization, themes, and disposal. |
fixtureResourceLoader.ts |
Loads grammar and WASM resources. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
a3c4b02 to
f5bbca5
Compare
Screenshot ChangesBase: Changed (92)5 insignificant change(s) omitted (≤20 px, Δ≤2). See CI logs for details. |
f5bbca5 to
f3c65d0
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
c9ac071 to
1d1b82c
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Please don't rebase and merge, it doesn't show the PR number in commit history and unnecessary shows all the commits there, please use squash and merge it clearly shows the pr name and number, normal merge with commit is also okay but it is not as clear as squash because it shows branch name instead of PR title. In this screenshot we have all three examples
|



Summary
The shared fixture Dark color theme remains Dark Modern in this PR. Switching the fixture default to Dark 2026 stays separate, and fully scoped multi-theme token palettes remain tracked by #335530.
Validation
npm run transpile-clientnpm exec eslint -- src\vs\workbench\test\browser\componentFixtures\fixtureResourceLoader.ts src\vs\workbench\test\browser\componentFixtures\fixtureSyntaxHighlighting.ts src\vs\workbench\test\browser\componentFixtures\fixtureSyntaxHighlighting.test.ts src\vs\workbench\test\browser\componentFixtures\fixtureUtils.ts.\scripts\test.bat --run src\vs\workbench\test\browser\componentFixtures\fixtureSyntaxHighlighting.test.ts(6 passing)