Skip to content

fix(tui): use type color for builtin types instead of error color#20411

Open
aaron-he-zhu wants to merge 1 commit intoanomalyco:devfrom
aaron-he-zhu:fix/tui-builtin-type-highlight
Open

fix(tui): use type color for builtin types instead of error color#20411
aaron-he-zhu wants to merge 1 commit intoanomalyco:devfrom
aaron-he-zhu:fix/tui-builtin-type-highlight

Conversation

@aaron-he-zhu
Copy link
Copy Markdown

Issue for this PR

Closes #20151

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Builtin scopes (type.builtin, variable.builtin, function.builtin, module.builtin, constant.builtin) in TUI syntax highlighting were mapped to theme.error (red), making normal keywords like string, number, boolean look like syntax errors in code blocks. Changed the foreground to theme.syntaxType, consistent with how other type-related scopes (type, class, module) are highlighted.

How did you verify your code works?

Opened TypeScript code in the TUI and verified builtin types render in the type color instead of error red.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Builtin types like string, number, boolean were highlighted with the
error color (red) instead of the type color (yellow). This made them
look like syntax errors in code blocks.

Map the builtin scopes (type.builtin, variable.builtin, etc.) to
syntaxType instead of error, consistent with the desktop UI which uses
--syntax-primitive for these tokens.

Closes anomalyco#20151
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.

syntax highlighting for builtin types should not be rendered as error

1 participant