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

enhance: syntax highlighting for json/yaml #558

Merged
merged 6 commits into from
Jun 5, 2024

Conversation

plyr4
Copy link
Contributor

@plyr4 plyr4 commented May 10, 2024

implemented using https://github.com/alecthomas/chroma v2

adds a couple flags:

  • VELA_COLOR - enable/disable color
  • VELA_COLOR_FORMAT - sets the formatter (terminal, terminal256, etc, see chroma)
  • VELA_COLOR_THEME - sets the color theme (monokai, onedark, etc, see chroma)

putting this out early to get some feedback but i still need to add some tests and better user flag options etc

json - monokai theme

Screenshot 2024-05-10 at 4 46 56 PM

yaml - nord theme

Screenshot 2024-05-10 at 4 47 58 PM

@plyr4 plyr4 requested a review from a team as a code owner May 10, 2024 21:45
internal/output/color.go Outdated Show resolved Hide resolved
internal/output/color.go Show resolved Hide resolved
action/secret/secret.go Outdated Show resolved Hide resolved
action/config/load.go Show resolved Hide resolved
action/config/load.go Show resolved Hide resolved
Copy link

codecov bot commented May 10, 2024

Codecov Report

Attention: Patch coverage is 70.22222% with 67 lines in your changes missing coverage. Please review.

Project coverage is 78.88%. Comparing base (88582e2) to head (04308e4).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #558      +/-   ##
==========================================
- Coverage   79.90%   78.88%   -1.03%     
==========================================
  Files         161      162       +1     
  Lines        3982     4106     +124     
==========================================
+ Hits         3182     3239      +57     
- Misses        581      632      +51     
- Partials      219      235      +16     
Files Coverage Δ
action/build/cancel.go 100.00% <100.00%> (ø)
action/build/get.go 93.10% <100.00%> (ø)
action/build/restart.go 100.00% <100.00%> (ø)
action/build/view.go 100.00% <100.00%> (ø)
action/config/generate.go 90.47% <100.00%> (+0.73%) ⬆️
action/deployment/add.go 91.30% <100.00%> (ø)
action/deployment/get.go 90.90% <100.00%> (ø)
action/deployment/view.go 100.00% <100.00%> (ø)
action/hook/get.go 81.81% <100.00%> (ø)
action/hook/view.go 100.00% <100.00%> (ø)
... and 89 more

Copy link
Contributor

@wsan3 wsan3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wsan3 wsan3 merged commit b2c2c78 into main Jun 5, 2024
14 of 17 checks passed
@wsan3 wsan3 deleted the enhance/pipeline-syntax-highlight branch June 5, 2024 20:45
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.

None yet

4 participants