-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bgcolor highlighting of ast nodes in traceback may be unreadable #13486
Comments
Duplicate #13446 |
Linked issue is locked, and as I understood it mostly focused on choosing new default color/style instead of exposing Token.ExecutingNode for style_overrides config option. Mentioning that "bg:ansiyellow" is being only used as fallback in def style_with_executing_node(style, modifier):
from pygments.styles import get_style_by_name
if isinstance(style, str):
style = get_style_by_name(style)
class NewStyle(style):
for_executing_node = True
styles = {
**style.styles,
**{
k.ExecutingNode: v + " " + modifier
for k, v in style.styles.items()
}
} Therefore we really don't have a way to modify it from user config -- only through modifiying sources itself. |
I have spent several hours reading the source and issues trying to override these colours. It's pretty bad for dark backgrounds, and I finally have the normal colours sorted, but I would really really really like the ability for the traceback to be customised-- especially the node colour. It's unusable on dark backgrounds and clashes with everything else. |
Being able to customise it would be ideal as currently is illegible on a dark terminal unless you have a muted yellow. Unfortunately I don't know how it's all plumbed together so I am not sure how to make the change. For iTerm2 at least using anisred for the BG colour is quite legible for both light and dark (when editing the source). If I change it like so:
(And add |
Has there been plans to fix this issue? First use after many years and experienced the problem immediately. Errors are unreadable, so the tool basically becomes impossible to use normally. I have to run things in a simple python console instead to see anything. FYI I'm on Windows with Putty (Kitty fork). Tweaking the terminal colors is a huge hack at the very least and not a solution: only IPython outputs unreadable text (white on bright yellow) from all the things I've been using in the past years. (I'm actually surprised that it wasn't fixed before; it really should be a blocking issue in my book. Am I the only one having this issue? Otherwise is there any way I can disable this whole colored output in IPython (not the terminal) in order to restore usability?) Also the original issue was locked ("off-topic" ?) so no one can comment there. Perhaps work is being done elsewhere? Thanks for all the efforts put in IPython nonetheless, it's excellent! |
For example put from IPython.core.ultratb import VerboseTB VerboseTB._tb_highlight = "bg:#039dfc" In your ipython_config.py Mitigate ipython#13446 and ipython#13486
See #13756 as a workaround. But really most of the open issue that are not fixed is really because someone need to dive into them and do the work. |
For example put from IPython.core.ultratb import VerboseTB VerboseTB._tb_highlight = "bg:#039dfc" In your ipython_config.py Mitigate ipython#13446 and ipython#13486
The commit 3026c20 introduced a change with a hard-coded
bg:ansiyellow
color.Unfortunately, for some terminal color schemes, white-on-yellow may be unreadable, for example:
Changing to
bg:ansired
looks better:Is it possible to make this option configurable?
Thank you!
The text was updated successfully, but these errors were encountered: