Skip to content
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

cargo pgx schema uses XTERM colors #507

Merged
merged 3 commits into from
Mar 25, 2022
Merged

Conversation

Hoverbear
Copy link
Contributor

Recently @eeeebbbbrrrr noticed on Mac's default Terminal.app (which doesn't include true colour support), cargo pgx schema would produce this undesirable output:

image

This is because it only supports 256 colors. 😢

So, instead, we mimic what the wonderful (also MIT licensed) bat does: sharkdp/bat@3099f51#diff-23172669e56dbc175323aa1386ecc2d11a9dcd38b561e822867eba12cc7b6434

Now cargo pgx schema uses a theme and the also-excellent owo-colorize's XTermColor functionality to use the users preferred terminal colors.

terminal.app:

image

On terminals where one can change the colour scheme without opening a new tab, it also adapts to these changes.

My Palenight theme on VsCode:

image

Changing the scheme (nothing else):

image

@Hoverbear Hoverbear self-assigned this Mar 25, 2022
Signed-off-by: Ana Hobden <[email protected]>
@Hoverbear Hoverbear merged commit 42e28f6 into develop Mar 25, 2022
@Hoverbear Hoverbear mentioned this pull request Mar 25, 2022
@eeeebbbbrrrr eeeebbbbrrrr deleted the repair-mac-syntax-highlighting branch June 20, 2023 18:00
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.

1 participant