Skip to content

fix: keyword.control and storage.modifier colors in 2026 Dark#315356

Open
albcantero wants to merge 2 commits into
microsoft:mainfrom
albcantero:fix/2026-dark-keyword-scope-inheritance
Open

fix: keyword.control and storage.modifier colors in 2026 Dark#315356
albcantero wants to merge 2 commits into
microsoft:mainfrom
albcantero:fix/2026-dark-keyword-scope-inheritance

Conversation

@albcantero
Copy link
Copy Markdown

Problem

2026-dark.json sets keyword and storage to #ff7b72, intending all keywords and storage types to render red. However, dark_modern.json (included via "include") defines more specific rules:

  • keyword.control#C586C0 (purple)
  • storage.modifier#569CD6 (blue)

Since more specific scopes take precedence, return, if, else render purple instead of red, and async, private, readonly render blue instead of red.

This also causes a visual inconsistency: return (#C586C0) and function names like getUser() (#d2a8ff, set explicitly via entity.name.function) end up as two slightly different purples with no semantic reason to differ.

Fix

Added explicit keyword.control and storage.modifier entries in 2026-dark.json so they are no longer inherited from the base theme.

Before / After

Token Before After
return, if, else #C586C0 purple #ff7b72 red
async, private, readonly #569CD6 blue #ff7b72 red

2026 Dark sets `keyword` and `storage` to #ff7b72, but dark_modern.json
(included via `include`) already defines more specific rules for
`keyword.control` (#C586C0) and `storage.modifier` (#569CD6). More
specific scopes win, so `return`, `if`, `else` render purple instead of
red, and `async`, `private`, `readonly` render blue instead of red.

This also causes a visual inconsistency: `return` (#C586C0) and function
names like `getUser()` (#d2a8ff, set explicitly via `entity.name.function`)
end up as two slightly different purples with no semantic reason to differ.

Added explicit entries for `keyword.control` and `storage.modifier` in
2026-dark.json so they are no longer inherited from the base theme.
Copilot AI review requested due to automatic review settings May 8, 2026 20:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the built-in 2026 Dark theme’s TextMate token colors to ensure control keywords and storage modifiers render consistently with the theme’s intended red styling, rather than inheriting more-specific colors from the included dark_modern.json.

Changes:

  • Add an explicit keyword.control rule in 2026-dark.json to override the base theme’s purple control-keyword styling.
  • Add an explicit storage.modifier rule in 2026-dark.json to override the base theme’s blue modifier styling.

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.

3 participants