Replace syntect with giallo for syntax highlighting.#350
Open
dflock wants to merge 4 commits intonlopes:mainfrom
Open
Replace syntect with giallo for syntax highlighting.#350dflock wants to merge 4 commits intonlopes:mainfrom
dflock wants to merge 4 commits intonlopes:mainfrom
Conversation
Owner
|
I'll take a look, this is still early that I'd be happy just killing syntect (not precious at all about it) but the rest of the changes I'll have to take a look. Specifically, want to think a bit if I want one highlight or end up with support for many (like asciidoctor does). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I played around with the syntax highlighting for a while and discovered that syntect isn't actually all that good - there are lots of issues here: https://github.com/getzola/zola/issues?q=is%3Aissue%20state%3Aclosed%20replace%20syntect - and the zola project eventually ended up developing giallo to replace it: https://github.com/getzola/giallo - summary of why:
So syntect is very out of date, using very old syntax definitions - and doesn't support things like typescript at all, which I needed.
So, I asked Claude Opus to replace syntect with giallo and this is the result.
It passes all the tests, compiles and it works! The syntax highlighting is much better, it supports all the languages and themes from VSCode, which is ~everything.
Caveat Emptor: I am an experienced developer, but not a rust dev. I kept a close eye on what Calude was up to and it seemed reasonable to me! One issue is that I checked acdc & giallo out into a new folder, next to each other, so I think that Claude has imported giallo from the sibling folder, rather than... importing the public crate, or whatever you are supposed to do?
I've attached the initial prompt, the plan produced, as well as the full output from Claude, just in case you wanted to check anything.
Anyway, I'm making this PR so that, if you wish, you can have a look and see what you think? Please don't feel obliged to wade through this if you don't want to, much less merge it, unless you think it's worthwhile.
1 - initial-prompt.md
2 - Plan to Replace syntect with giallo in acdc.md
3 - claude-opus-thread-1.md