Skip to content

fix: leave free-form string values at the default color (#467 #342)#483

Open
SJrX wants to merge 1 commit into
issue-345-13from
issue-345-14
Open

fix: leave free-form string values at the default color (#467 #342)#483
SJrX wants to merge 1 commit into
issue-345-13from
issue-345-14

Conversation

@SJrX

@SJrX SJrX commented Jun 21, 2026

Copy link
Copy Markdown
Owner

What

The default coloring heuristic mapped RegexTerminal → IDENTIFIER, so free-form values — Description=, interface names like Bond=bond1, etc. — got recolored as identifiers. That felt wrong: those should keep the editor's normal value color. Make RegexTerminal uncolored by default.

Stacked on #482 (issue-345-13). Effectively walks back the auto-identifier coloring (and the Identifier preview example added in #482).

Changes

  • defaultRole: RegexTerminal now falls through to null (no grammar coloring) — free-form names/strings keep the default value color.
  • Color settings: drop the Identifier (grammar) descriptor, its demo tag, and the Description= example, since nothing uses the IDENTIFIER role by default anymore.
  • Kept: the Role.IDENTIFIER enum and its GRAMMAR_IDENTIFIER key, so a grammar can still opt a specific field in via Labeled(Role.IDENTIFIER, …) later (e.g. a single-token, can't-be-space-separated field like User=) — at which point we'd re-add the descriptor + example.

Enum / Literal / Operator coloring is unchanged. Full suite green.

Refs #467 #342

🤖 Generated with Claude Code

The default heuristic mapped RegexTerminal -> IDENTIFIER, so free-form values like
Description= and interface names (Bond=) got recoloured, which felt wrong — those
should keep the editor's normal value color. Make RegexTerminal uncoloured by default.

- defaultRole: RegexTerminal now falls through to null (no coloring).
- Drop the Identifier descriptor + tag + demo example from the color settings page,
  since nothing uses the IDENTIFIER role by default now. The Role and its key are kept
  for grammars that opt in explicitly via Labeled later (e.g. a single-token User=).

Refs #467 #342

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Test Results

1 142 tests  ±0   1 142 ✅ ±0   45s ⏱️ -3s
  303 suites ±0       0 💤 ±0 
  303 files   ±0       0 ❌ ±0 

Results for commit 99723b8. ± Comparison against base commit 788fd59.

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