fix: leave free-form string values at the default color (#467 #342)#483
Open
SJrX wants to merge 1 commit into
Open
fix: leave free-form string values at the default color (#467 #342)#483SJrX wants to merge 1 commit into
SJrX wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The default coloring heuristic mapped
RegexTerminal → IDENTIFIER, so free-form values —Description=, interface names likeBond=bond1, etc. — got recolored as identifiers. That felt wrong: those should keep the editor's normal value color. MakeRegexTerminaluncolored by default.Changes
defaultRole:RegexTerminalnow falls through tonull(no grammar coloring) — free-form names/strings keep the default value color.Description=example, since nothing uses theIDENTIFIERrole by default anymore.Role.IDENTIFIERenum and itsGRAMMAR_IDENTIFIERkey, so a grammar can still opt a specific field in viaLabeled(Role.IDENTIFIER, …)later (e.g. a single-token, can't-be-space-separated field likeUser=) — 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