Skip to content

Comments

Replace syntect with giallo for syntax highlighting.#350

Open
dflock wants to merge 4 commits intonlopes:mainfrom
dflock:replace-syntect-with-giallo
Open

Replace syntect with giallo for syntax highlighting.#350
dflock wants to merge 4 commits intonlopes:mainfrom
dflock:replace-syntect-with-giallo

Conversation

@dflock
Copy link

@dflock dflock commented Feb 21, 2026

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:

syntect is using old Sublime Text syntaxes, it doesn't support features that recent syntaxes use (see trishume/syntect#271). Projects like bat keep their own curated set of grammars, sometimes applying patches to fix things. The Rust syntax for example is about 6 years old and does not know about async/await. VSCode is also a LOT more popular than Sublime these days.

Giallo has been developed to replace syntect usage in Zola.

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

@dflock dflock changed the title Initial claude syntect->giallo commit Replace syntect with giallo for syntax highlighting. Feb 21, 2026
@nlopes
Copy link
Owner

nlopes commented Feb 21, 2026

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).

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