gh-131507: Add support for syntax highlighting in PyREPL by ambv · Pull Request #131562 · python/cpython
ambv
mentioned this pull request
| import unicodedata | ||
| import functools | ||
|
|
||
| from idlelib import colorizer |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| import functools | ||
|
|
||
| from idlelib import colorizer | ||
| from typing import cast, Iterator, Literal, Match, NamedTuple, Pattern, Self |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment on lines +20 to +27
| type ColorTag = ( | ||
| Literal["KEYWORD"] | ||
| | Literal["BUILTIN"] | ||
| | Literal["COMMENT"] | ||
| | Literal["STRING"] | ||
| | Literal["DEFINITION"] | ||
| | Literal["SYNC"] | ||
| ) |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| type ColorTag = ( | |
| Literal["KEYWORD"] | |
| | Literal["BUILTIN"] | |
| | Literal["COMMENT"] | |
| | Literal["STRING"] | |
| | Literal["DEFINITION"] | |
| | Literal["SYNC"] | |
| ) | |
| type ColorTag = Literal["KEYWORD", "BUILTIN", "COMMENT", "STRING", "DEFINITION", "SYNC"] |
Here's what it looks like with the default Ubuntu dark/light themes:
The contrast of the blue color seems a bit too low for the dark theme (I had the same issue in #132126). Maybe the 'intense' variant might look better?
ambv
mentioned this pull request
ambv
deleted the
pyrepl-syntax-highlighting
branch
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