Hacker GitHub

← All repos

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

Mentions per year 11 mentions · busiest year 2017 (3)
20082026
  1. …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…
  2. …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]…
  3. 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…
  4. 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…
  5. …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
  6. ▲ 3
    A general purpose syntax highlighter in pure Go
    story by patrickdevivo · 2020-04-01 · 0 comments
  7. ▲ 2
    A Pure Go general purpose syntax highlighter
    story by arparthasarathi · 2019-11-30 · 0 comments
  8. 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…
  9. …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…
  10. ▲ 102
    Chroma – A General purpose syntax highlighter in Go
    story by kiyanwang · 2017-09-24 · 24 comments
  11. ▲ 2
    Chroma – A a pure Go syntax highlighting engine with support for ~150 languages
    story by foob · 2017-09-18 · 0 comments