fix: apply contributed token colours via configurationDefaults#16
fix: apply contributed token colours via configurationDefaults#16paxcalpt wants to merge 1 commit into
Conversation
contributes.tokenColors is not a supported VS Code contribution point and had no effect, so the extension's intended colours for <newpage>, blindtext placeholders, and embedded Python/TeX blocks were never applied. Move all 23 rules into editor.tokenColorCustomizations under configurationDefaults (the working mechanism, same one used for the cross-ref label colour) and remove the inert tokenColors block. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Code Review: fix/apply-token-coloursOverview: Relocates 23 token colour rules from What's Good
Issues to Consider
Minor
Verdict: Approve pending the trailing whitespace fix and a light-theme visual check. The logic is sound and the migration strategy is correct. |
There was a problem hiding this comment.
Pull request overview
This PR moves inactive token color contributions into VS Code’s supported configurationDefaults.editor.tokenColorCustomizations path so rxiv-markdown syntax colours can be applied through the extension manifest.
Changes:
- Relocates token color rules from unsupported
contributes.tokenColorsintoconfigurationDefaults. - Removes the obsolete
tokenColorscontribution block. - Adds an Unreleased changelog entry describing the token colour fix.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
package.json |
Moves token color rules into editor.tokenColorCustomizations.textMateRules and removes tokenColors. |
CHANGELOG.md |
Documents the token colour relocation under Unreleased. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
| }, | ||
| { | ||
| "scope": "keyword.control.placeholder.blindtext.rxiv", |
| } | ||
| }, | ||
| { | ||
| "scope": "keyword.control.import.python.rxiv", |
Code Review: fix/apply-token-coloursOverviewThis PR relocates 23 The fix is correct and necessary. However, there is one real bug that should be addressed before merging. Critical Issue[Bug] {
"scope": ["markup.subscript", "markup.superscript"],
"settings": { "foreground": "#A0A0A0" }
}Unlike every other rule in this block (all of which use Recommended fix: rename these scopes in the grammar to Other Issues[Minor] Trailing whitespace in package.json (line after last added rule) The diff shows a line [Minor] Hardcoded Dark+ palette — light theme users will see reduced contrast All colours ( [Minor] Version not bumped
[Informational] Stacking dependency PR explicitly states it is stacked on #15 (base = What Works Well
Security / PerformanceNo concerns — static JSON configuration. VerdictRequest changes. The |
|
Superseded by #15, which now folds in this tokenColors→configurationDefaults migration alongside the full cross-reference colour scheme and the 0.3.16 release. |
What
Relocates all 23
contributes.tokenColorsrules intoeditor.tokenColorCustomizationsundercontributes.configurationDefaults, and removes the now-emptytokenColorsblock.Why
contributes.tokenColorsis not a supported VS Code contribution point — VS Code never reads it and the compiled extension does not apply it, so the intended colours for<newpage>, blindtext placeholders, and embedded Python/TeX blocks have never actually rendered. This moves them to the supported mechanism (the same one PR #15 uses for cross-reference labels), so they apply as authored.Notes
scope/settingsis unchanged, only re-indented into the working location.feat/colour-crossref-labels). Merge feat: cross-reference colour scheme + apply contributed token colours (v0.3.16) #15 first, or retarget tomainafter it merges.🤖 Generated with Claude Code