Skip to content

[highlights] fix github-dark-default parameter, member, and JSX = colors - #1218

Merged
ije merged 1 commit into
pierrecomputer:mainfrom
liby:highlights/github-dark-default-token-coverage
Oct 23, 2026
Merged

ije merged 1 commit into
pierrecomputer:mainfrom
liby:highlights/github-dark-default-token-coverage

Conversation

@liby

@liby liby commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Description

This PR changes three entries in packages/highlights/themes/github-dark-default.json so that the theme colors these tokens the way Shiki's github-dark-default does:

Token Shiki github-dark-default Before After
TS/JS parameters orange text color orange
Member access (a.b) text color orange text color
JSX attribute = red text color red

In Highlights, property and variable.parameter are each a single token shared by every language, so two cases still differ from Shiki. CSS property names are blue in Shiki; this change moves them from orange to the text color. Python parameters use the text color in Shiki and are orange after this change. github-light-default, github-dark-dimmed, and both high-contrast themes already color these two cases this way.

Before

github-dark-default before this change

After

github-dark-default after this change

Motivation & Context

In @pierre/diffs, the theme name github-dark-default loads Shiki's TextMate theme under the Shiki highlighter and this Zed port under preferredHighlighter: 'highlights', so switching to Highlights changes the colors above for the same theme.

The port comes from MordFustang21/zed-github-dark, while the other GitHub themes come from PyaeSoneAungRgn/github-zed-theme. It has no variable.parameter or punctuation.delimiter.jsx entry, so both tokens fell back to the text color. Its orange property entry was added in #1166, but GitHub's TextMate theme has no rule for the scopes Zed maps to property: it colors member access through variable.other, which uses the text color.

This change also makes github-dark-default agree with github-light-default. When the two were used as a light/dark pair, parameters and members swapped colors between modes.

Type of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality). You must have
    first discussed with the dev team and they should be aware that this PR is
    being opened
  • Breaking change (fix or feature that would change existing functionality).
    You must have first discussed with the dev team and they should be aware
    that this PR is being opened
  • Documentation update

Checklist

  • I have read the
    contributing guidelines
  • My code follows the code style of the project (moon run root:lint)
  • My code is formatted properly (moon run root:format)
  • I have updated the documentation accordingly (if applicable)
  • I have added tests to cover my changes (if applicable)
  • All new and existing tests pass (moonx diffs:test)

moonx highlights:test passes as well (2027 tests).

How was AI used in generating this PR

Claude Code (Claude Fable and Claude Opus) compared the theme against Shiki's GitHub themes and the other bundled GitHub themes, made the change, rendered the screenshots with a script, ran the checks, and drafted this description. I reviewed the change and the screenshots.

Related issues

None.

…olors

`github-dark-default` is the only GitHub theme ported from
MordFustang21/zed-github-dark, and three tokens resolved differently
from GitHub's own TextMate theme (Shiki's `github-dark-default`) and
from the other bundled GitHub themes:

- Parameters fell back to `variable`, the text color. GitHub colors
  TS/JS `variable.parameter` orange.
- `property` was orange. GitHub colors member access through
  `variable.other`, the text color; its TextMate theme has no rule for
  the scopes Zed maps to `property`.
- The JSX attribute `=` fell back to `punctuation`, the text color.
  GitHub colors it as `keyword.operator.assignment`, red.

`property` and `variable.parameter` are each one token across
languages, so CSS property names (blue in GitHub's theme) and Python
parameters (text color there) still differ, as they already do in
`github-light-default`, `github-dark-dimmed`, and the high-contrast
themes.
@vercel

vercel Bot commented Oct 23, 2026

Copy link
Copy Markdown

@liby is attempting to deploy a commit to the Pierre Computer Company Team on Vercel.

A member of the Team first needs to authorize it.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T02:47:12.882322Z 05757c2 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ije ije left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!!!! Thanks

@ije
ije merged commit 1b03352 into pierrecomputer:main Oct 23, 2026
4 of 8 checks passed
@liby
liby deleted the highlights/github-dark-default-token-coverage branch October 23, 2026 05:28
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.

2 participants