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

Colorize config output #77

Merged
merged 1 commit into from
May 20, 2022
Merged

Colorize config output #77

merged 1 commit into from
May 20, 2022

Conversation

chelnak
Copy link
Owner

@chelnak chelnak commented May 18, 2022

This PR adds optional colorization of the config output. In certain situations this can make reading configuration easier and it also looks pretty neat.

There is also an optional --no-color flag that can be passed. This will disable set the chroma formatter to noop rather than terminal16m. Currently, the data is still tokenized by chroma but not formatted so it does not print with any ascii codes.

In this implementation it doesn't matter too much because the size of the configuration will always been small so there are no major tradeoffs.. an improved solution could be to skip passing through chroma if the --no-color flag is passed!

@chelnak chelnak added the enhancement New feature or request label May 18, 2022
@chelnak chelnak force-pushed the chroma_config branch 2 times, most recently from bd662e2 to cfc0087 Compare May 20, 2022 15:53
This commit adds optional colorization of the config output. In certain
situations this can make reading configuration easier and it also looks
pretty neat.

There is also an optional --no-color flag that can be passed. This will
disable set the chroma formatter to `noop` rather than terminal16m.
Currently, the data is still tokenized by chroma but not formatted so
it does not print with any ascii codes.

In this implementation it doesn't matter too much because the size of
the configuration will always been small so there are no major
tradeoffs.. an improved solution could be to skip passing through chroma
if the --no-color flag is passed!
@chelnak chelnak merged commit 450bb45 into main May 20, 2022
@chelnak chelnak deleted the chroma_config branch May 20, 2022 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant