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

Add WitchHazel by Thea Flowers #570

Merged
merged 2 commits into from
Nov 9, 2021
Merged

Conversation

stefanv
Copy link
Contributor

@stefanv stefanv commented Nov 6, 2021

@stefanv
Copy link
Contributor Author

stefanv commented Nov 6, 2021

I have tested the addition using go test, but I would like to do some more testing (and visually inspect the output) before removing draft status.

Please forgive my ignorance, but I am new at go and cannot figure out how to install the binary for testing (go build and go install are both quiet).

@alecthomas
Copy link
Owner

go build will place it in the working directory

@alecthomas
Copy link
Owner

However you should add some actual tests to really be sure. Follow the README in lexers.

@stefanv
Copy link
Contributor Author

stefanv commented Nov 7, 2021

go build does not produce anything as far as I can tell. It also looks like none of the other styles have tests associated with them.

@alecthomas
Copy link
Owner

Ah sorry, I didn't read the code - the tests are for the lexers. go build will only produce an executable for a main package. I would build the chroma executable and use that:

go run ./cmd/chroma -s witchhazel SOMEFILE

@stefanv
Copy link
Contributor Author

stefanv commented Nov 7, 2021

Thanks, @alecthomas, that's helpful. This is where my inexperience with go is a problem; I'm sure it must be obvious, but when I run go run ./cmd/chroma I get:

go run: no packages loaded from ./cmd/chroma

Maybe I need some environment variable set, or a newer version of go? I have:

go version go1.17.3 linux/amd64

Feel free to just point me to a manual or website; I can teach myself if I have a rough sense of where to look.

@alecthomas
Copy link
Owner

Sorry that is my bad. I forgot that I made chroma a separate Go module. You'll need to do:

cd ./cmd/chroma
go run . -s witchhazel SOMEFILE

@stefanv
Copy link
Contributor Author

stefanv commented Nov 8, 2021

This worked well, and I was able to confirm that the theme renders as expected (I compared it with the Pygments output):

code rendering of witchhazel theme

@alecthomas alecthomas marked this pull request as ready for review November 9, 2021 07:51
@alecthomas
Copy link
Owner

Awesome, thanks :)

@alecthomas alecthomas merged commit 7cefa29 into alecthomas:master Nov 9, 2021
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.

2 participants