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

Proposal for adding chroma code highlight #39

Open
gabrielgio opened this issue Jun 29, 2024 · 2 comments
Open

Proposal for adding chroma code highlight #39

gabrielgio opened this issue Jun 29, 2024 · 2 comments

Comments

@gabrielgio
Copy link
Contributor

Hello,

I'd like to know if you are interested in adding highlight support through
chroma1.

I'd add chroma rendering to FileContent handler.

I'd also add option to select which theme do use2:

Meta struct {
	Title       string `yaml:"title"`
	Description string `yaml:"description"`
	CodeStyle   string `yaml:"style"
} `yaml:"meta"`

Let me know if you'd take it and I can submit the patch myself 😄

Footnotes

  1. https://github.com/alecthomas/chroma

  2. https://swapoff.org/chroma/playground/

@icyphox
Copy link
Owner

icyphox commented Jul 5, 2024

Hi again! I don't personally see the value in syntax highlighting but if it can be toggled on/off via config, that would be great. So something like

meta:
  syntaxHighlighting:
     style: bw

and the existence of the syntaxHighlighting block would enable it; disabled if not defined. How does that sound? :)

@icyphox
Copy link
Owner

icyphox commented Jul 5, 2024

Or better yet,

meta:
  syntaxHighlight: bw    # or some other chroma theme

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

No branches or pull requests

2 participants