fix(tui): use type color for builtin types instead of error color#20411
Open
aaron-he-zhu wants to merge 1 commit intoanomalyco:devfrom
Open
fix(tui): use type color for builtin types instead of error color#20411aaron-he-zhu wants to merge 1 commit intoanomalyco:devfrom
aaron-he-zhu wants to merge 1 commit intoanomalyco:devfrom
Conversation
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
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.
Issue for this PR
Closes #20151
Type of change
What does this PR do?
Builtin scopes (
type.builtin,variable.builtin,function.builtin,module.builtin,constant.builtin) in TUI syntax highlighting were mapped totheme.error(red), making normal keywords likestring,number,booleanlook like syntax errors in code blocks. Changed the foreground totheme.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