alecthomas/chroma
View on GitHub ↗ ★ 5,074 Go
A general purpose syntax highlighter in pure Go
11 mentions on Hacker News by 10 people: 4 stories, 7 comments · first 2017-09-18 · latest 2026-01-04
20082026
-
…expression language so it was super easy to implement it! Used this for code syntax higlighting: https://github.com/alecthomas/chroma And this for markdown: https://github.com/russross/blackfriday The rest I implemented myself in simple to…
comment by brabel · 2026-01-04 · in Jeffgeerling.com has been migrated to Hugo -
…many keywords seem to have aligned well enough)! [1] https://github.com/Depado/bfchroma/ [2] https://github.com/alecthomas/chroma#supported-languages [3] https://pygments.org/docs/lexerdevelopment/ [4]…
comment by brabel · 2022-07-02 · in Virgil: A fast and lightweight programming language that compiles to WASM -
See also: Chroma ( https://github.com/alecthomas/chroma ) based on Pygments ( https://pygments.org ). JS libs like Highlight.js and Prisma.js can be ran server side and then you send the HTML/CSS like normal. Generally you'd want to…
comment by hunterb123 · 2022-01-17 · in Show HN: Pure CSS/HTML C# syntax highlighting without JavaScript -
In Go we have https://github.com/alecthomas/chroma , and I implemented the lexer that the Caddy docs use for syntax highlighting the Caddyfile (see https://caddyserver.com/docs/caddyfile/concepts for example). What's cool about this is…
comment by francislavoie · 2021-03-25 · in Syntax Highlighting in a Webpage Without JavaScript -
…it in their own websites. [1] https://groups.google.com/d/msg/golang-nuts/hJHCAaiL0so/kG3B... [2] https://github.com/alecthomas/chroma [3] https://highlightjs.org/ [4] https://gbws.io/scss/syntax.min.css [5] https://blog.golang.org/go-fonts
comment by guessmyname · 2020-05-26 · in Instrumentation in Go -
Have a look at http://pygments.org/ or https://github.com/alecthomas/chroma where you can pass code into a library and it returns highlighted HTML. You can use Pygments in Java using Jython but its performance is questionable and can be…
comment by boyter · 2019-06-17 · in Love It or Hate It, Java Continues to Evolve -
…has recently started using a go-based syntax highlighter that's built in, called chroma i believe ( https://github.com/alecthomas/chroma ), which is supposed to be much faster than pygments. anyways, this project looks very interesting to…
comment by smorks · 2017-10-19 · in Show HN: Gutenberg – A static site engine as a single executable