Download Latest Version v0.10.0 source code.tar.gz (69.5 kB)
Email in envelope

Get an email when there's a new version of Glamour

Home / v0.9.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2025-03-13 2.4 kB
v0.9.0 source code.tar.gz 2025-03-13 108.7 kB
v0.9.0 source code.zip 2025-03-13 162.4 kB
Totals: 3 Items   273.5 kB 0

Better Syntax Highlighting, Better Tables

It's totally time for a Glamour release right? This release features a nice lil' contribution from the @github CLI team and pulls in some big table improvements from Lip Gloss upstream. Let's go!

Specifying Chroma Styles

Thanks to valiant efforts of @andyfeller and @williammartin the @github CLI team, you can now use glamour.WithChromaFormatter to specify an exact Chroma style to use, independent of the higher level style.

:::go
myHotOps := glamour.WithOptions(
    glamour.WithChromaFormatter("terminal16"),
    glamour.WithStandardStyle("dark"),
)

As a bonus, you can also use glamour.WithOptions as a meta layer for grouping options.

Better Tables

This release also reaps the benefits from the table rendering overhaul in Lip Gloss v1.1.0!. Glamour will now be much smarter when it comes to deciding column widths, and the content will not wrap appropriately instead of just being cut when it won't fit.

Changelog

New Features

  • 4c040b7fd5c023154de93d5c0f789111ea06c82c: feat: add term renderer option for chroma formatter (#395) (@williammartin)
  • 39de44871fad9d547af5975ae220f2034642304a: feat(ci): use goreleaser (#348) (@aymanbagabas)

Bug fixes

  • f43b1ad9ef09b10a93837e07ae2c18b66bceac5c: fix(tables): pin lipgloss to v1.1.0 for table improvements; update tests (#394) (@andreynering)
  • bdc4ec5217e146f5a57be8a3e0a14a3ddee3f749: fix(table): fix rendering table in ascii-only mode (#393) (@andreynering)
  • 9cedacac492db45121a984505f3f4d87277dcde3: fix: render right margin for block stack elements (#334) (@jahvon)

Documentation updates

  • f29dc10685689be9846671030e07a17f97bafb16: docs(example): update example to demonstrate color downsampling (@meowgorithm)

The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.

Source: README.md, updated 2025-03-13