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 at @github, you can now use glamour.WithChromaFormatter
to specify an exact Chroma style to use, independent of the higher level style.
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
- 4c040b7: feat: add term renderer option for chroma formatter (#395) (@williammartin)
- 39de448: feat(ci): use goreleaser (#348) (@aymanbagabas)
Bug fixes
- f43b1ad: fix(tables): pin lipgloss to v1.1.0 for table improvements; update tests (#394) (@andreynering)
- bdc4ec5: fix(table): fix rendering table in ascii-only mode (#393) (@andreynering)
- 9cedaca: fix: render right margin for block stack elements (#334) (@jahvon)
Documentation updates
- f29dc10: docs(example): update example to demonstrate color downsampling (@meowgorithm)
Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.