cargo-expand
cargo-expand copied to clipboard
Output is unreadable if the terminal uses black text on white background
Here's a sample screenshot of how cargo expand
output looks for me:
As you can tell, that's pretty much useless. I have to copy-paste it into an editor to get rid of the formatting and see all the white characters on white background.
https://github.com/dtolnay/cargo-expand?tab=readme-ov-file#configuration
You can use a different theme, there are some suggestions for light backgrounds in the upstream readme https://github.com/sharkdp/bat?tab=readme-ov-file#highlighting-theme
Seems not great to require users to do manual configuration to be able to read anything. I have not yet encountered this with any other application. (Some, e.g. aptitude, just overwrite all colors so they are still white-on-black despite by black-on-white terminal theme. But that's fine, the application at least remains usable.)
Can't the default theme be set to use 4bit colors to avoid overriding the terminal color scheme?
I would like to add that research shows that reading dark text on a light background is physiologically preferable in most circumstances. A default that doesn't work unless one follows current fashion may not be the best choice.