chroma

A general purpose syntax highlighter in pure Go

MIT License

Downloads
91
Stars
4.2K
Committers
239

Bot releases are visible (Hide)

chroma - v2.0.0-alpha3

Published by github-actions[bot] over 2 years ago

Changelog

  • c66ec1e Upgrade goreleaser from 0.184.0 to 1.5.0
chroma - v2.0.0-alpha2

Published by github-actions[bot] over 2 years ago

Changelog

59896e3 Flag groups for "chroma", making it a bit clearer for users.
33fa611 Update friendly.go

chroma - v2.0.0-alpha1

Published by github-actions[bot] over 2 years ago

Changelog

cc2dd5b Version 2 of Chroma
d491f1b Helper scripts for on-the-fly running chroma{,d}.
4ba9a05 Add mariadb aliases
0b2b5ee Add[styles/gruvbox]: vim gruvbox theme for chroma (#592)

chroma - v0.10.0

Published by github-actions[bot] almost 3 years ago

Changelog

36bdd4b Benchmark Java instead of Go.
b01c8fc Added OpenEdgeABL lexer (#585)
decf9d3 Highlight MSBuild project files for C#, F#, and C++ as XML. (#584)
3bdc3fb Removed mimetype for the Lexer bicep (#574)
ac2891f Add support for more complex command prompts (#583)
d38fcfc fixed scheme characters
06f476d Add lexer for Typed and Untyped Plutus Core (#579)
3f5761f Fix background color of xcode-dark style
d6e61d3 Use span for .line, put code inside <code>
5ed5054 Put lines in a div & code lines in a span, Add WrapLongLines Option
7cefa29 Add WitchHazel by Thea Flowers (#570)
0fcd2d8 Add lexer/detector for zed
2023798 feat: Added .bicep lexer #562 (#564)
175c35e Handle enclosing backtick in Kotlin lexer for identifiers, close #565
4c36740 Refinement of the C# lexer (#563)
0e8972e Fix chromad build.

chroma - v0.9.4

Published by github-actions[bot] about 3 years ago

Changelog (since 0.9.2)

6520148857c2ae3106ff371e527abea815b23915 Re-add release workflow.
22ed667b6d41aad783d23c5b69bf24b7ccb48564 Add binary number to go lexer
785554e8b16b31ed88ebbd7156d24c4acf32fd49 Add sieve lexer
4b2b42da1d904cd8e5ffc6684bb23ba089192454 Tidy go.mod
9a8a647afb8f8e7ad2c961c477ca152b3b228815 Report file pattern errors when a lexer is initialised.
07a127dd74e0cf0b2d38def211382418b0baee8d Test for compiling all lexer patterns.
23160b30588bdfbf8f017037f9920e21e9aea8d3 lexers/internal: remove danwakefield/fnmatch
368394959b4562fb33caf5372828eb03859d9eef Update go modules
7259f5b2547990cb79197787c6cd7051936c7cc6 BashSession lexer
4d7154e8c7144dda848b882c81b8cd11c7b6c698 Raku: Fix unterminated heredoc fixes #547
82795e1420cca19a5eaa4c45e4340f4e063cdab1 Update to the last version of microsoft grammar file
04ed07d7b4022c8b9cbb3cd3001c0507238b37bf Update rust lexer (#548)
d1f987668b9d720348552025d5b4893fcdefc8fa Add JSON test.
f7c1454f132ccd52acb6a79c313daf63dc219c11 Support comments in JSON
02951cec424f204b6624f266a832d111fdb382df Implement 1S:Enterprise (#545)
4436c497ee311e32408f0826dc38fb44227f901a lexers: add Debian user configuration file backups to ignored suffixes
26f16a6f7ca2653220fc45081f6e387f9a5d1ed4 Raku: Improve nested regex and code, function designs
4f779665e94c1ac63e07c437409d5db9e33a4c79 Raku: Add more test data
22fac1fc0fa4c15381c51440380b8377d70368f5 Raku: Fix Match hash access, $
2535d1a99ead7d14a356c94d1aa1d8671040b124 Raku: Fix operators that come after <
bb38ae204f9b1c1e41f72f6f69b56b1ae329340b Raku: Fix detecting adverbs, plus a little cleanup
2eba3ce9a1fdbaf81232257031297aa153372575 Update APL lexer to cope with current Dyalog APL
b71f4c66073d03e062aa6f8e2109326ebbde6795 Raku: Fix incorrectly matching closing brackets as opening
7966c295269fb4d9faf3d37eb6659b2955bf5179 Update README.md
61cfd7d7a709590e26f3854ef4ec543c8c710fbb Update README.md
594e3117f88757d552aca1a7c0b567dca6713db6 Update README.md
f4ffd6cea954f700ac8bd5fe003854794f54e199 Fix Raku colon pair, function adverb and POD declaration
2cff0c9b1f60b5f72d79469dcd1fe92d4bc87cdf Switch from Circle to GHA.
fb1dd01cfb0330eddacf7729eeea729dc47f152f [kotlin] expensive char list -> char classes
eafea0d771c31bf8c6a76d0c476e2bcdcec1ec60 replace expensive char lists with char classes
f09329ae624b870b8966ebdf2079dd6fa960e729 Add lexer for Meson build system
a0e9618fbcc4021728be2d8195c8b043a52b4e4e ARM ASM (#531)
d40210297631298bde98a8fcfd52c3d2555cc367 Support Fennel. (#530)
21a1750dc27a5a212dd6ee37a902bdf7485d4508 Remove go get for installation from README
6a6cf1764db914057a47d8fb782924f27dd3a7b9 Fix some buggy number patterns.
d4eaef361b560e843d537a82b5dfd1f2fad742b7 Release arm64 builds.
54fd3bc12f037b727a8ca9537e0008e5331b4645 Clean up imports and make cmd/chroma its own module.
9df8bd4f92e3e7ec6b49cc87764f772d3780a175 fish: Fix incorrect tokenisation of command arguments containing dash

chroma - v0.9.2

Published by alecthomas over 3 years ago

Changelog

841c391 Basic lexer for Microsoft Power Query M (#462)
d13f838 Added uint8_t to c lexer.
402a150 SCSS fixes and modifications, fixes #451
3ec0455 Some Raku modifications and making use of #519 and #518
10329f8 Add ByGroupNames function, same as ByGroups but use named groups (#519)
22cbca5 Allow skipping group's emitter, via passing nil as emitter
4b989ea feat(styles/dracula): use official green and red for inserted and deleted
c8581d4 Add tabindex="0" to default <pre> wrapper
8513d99 Add new style - "hr" (#513)
99e6696 Use Hermit (https://github.com/cashapp/hermit) to manage build tools.
a566061 Add set text analyser for MySQL lexer
d964e7c pygments2chroma updates (#509)
9391121 Add Metal lexer
b5d03c0 feat(regexlexer): compile in RE2 compatibility mode
4d45300 feat(lexers/c): associate with XBM and XPM
14a8aba feat(lexers): match filenames ignoring trailing .in
2bcdf19 [doom-one] Change style of NameAttribute
33faf55 Improve fish lexer. Add syntax highlighting for commands
35539cf gofmt
465a27c cmd: --fail earlier without reading entire input files (#502)
e87e5b2 cmd: add optional silent fail mode on no specific lexer
2e23e7f regexp2 uses number of group as its name so name check isn't needed
1b7d2dd Update Python lexers and add tests for them
ff6eedb Fix: sort words in descending order of length before regex generation (#496)
225e186 Pass *LexerState as context to emitters
2cc8645 Add FortranFixedLexer
312be63 Allow several tests for a same lexer
dcfd826 Add support for named capture groups
15f2498 lexers: add one for groff
8bba42c Update mimetypes in Python lexers
515a389 gofmt
ba03a8b Use Python 3 by default
929f473 gofmt
b3d969c python: add *.pyi
d489fc3 systemd: add more filename globs
e424fed lexers: match by known backup filename suffixes
386cc48 toml: allow - in keys
72795c5 Add test for methodop .&
ad7162c Some bug fixes for Raku lexer
f6d1db5 Change some colors, Add a new variation
1231145 Add doom-one style
d6bdd14 sort lexers with lower case
373b6b7 Fix SCSS properties, add missing operator and keywords
a09abba Update golangci-lint so we can force use of LazyLexer.
7e282be Update golangci-lint so we can force use of LazyLexer.
f387459 Convert raku to lazy lexer (#479)
15b75a6 File name matches and mime matches should be moved to phtml from php lexer (#477)
d4eca2a Svelte Lexer Improvements (#478)
3626d89 Fix lint.
575caac Improve lexer for Solidity
cab6ebc Add basic lexer for Svelte
e86123a better markdown lexer
9de08fc Add Raku lexer (#476)

chroma - v0.9.1

Published by alecthomas over 3 years ago

Changelog

c44c690 Switch chromad to go:embed and show version.
7410d4a Update chromad modules.

chroma - v0.9.0

Published by alecthomas over 3 years ago

Changelog

f235772 Update Slack link.
9866a75 Fix a typo into the lables regex for PromQL lexer
b790655 Fix PromQL lexer to support values enclosed within single quotes
d11bdac Add AL lexer
f4cddf0 Update Julia syntax highlighting from pygments (#472)
d67a2bf fix: synthesisable entries are ignored when cloned (#465)
41b886a Simplify the cmdlet ("NameBuiltin") rule
eb257ed Add a Dylan lexer
a9e4a4e Fix link to pygments-lexers.txt
9dc3c8c Add new style called "xcode-dark" (#460)
7a68f3e LiteralNumberHex: underscore support
d72f847 Create FUNDING.yml
b20de63 Create new style - "vulcan"
e6d871d Support lone '$' in Go templates.
c49d52b Add mcfunction lexer
59126c5 Add NewLazyLexer to defer rules definitions and reduce init costs (#449)
5da8316 Fix a few bugs including sub-lexers adding additional newlines when EnsureNL is true.
2a1e1a1 Add EnsureNL to C/Java lexers.
305a039 Update to latest dlclark/regexp2.
7dbcddc Change Text token to TextWhitespace token in SQL lexers
898761d Move lexers to correct folders
5b9087a Fix CSS lexer
6e272cf Introduce the Nord theme
b351ea7 Add various alternate file extensions to lexers
881d54f Improve number literals for several languages

chroma - v0.8.2

Published by alecthomas almost 4 years ago

Changelog

74f5402 Update table of supported languages
473ed23 Update table.py to write changes on README.md
c788380 Minor code formatting changes using Black
eb0e31f Add PromQL lexer
552ad24 Rust multi-line strings
ab61726 Make linkeable lines a link to themselves
9eb358b Update Rust keywords/types (#419)
9b3cf51 zig: Detect visual separators in integer literals
e3a674c Add base16-snazzy style
2735a5f Agh.
d620d6e Only release on tagged versions.
95d002d CI fixes.
a49e744 Spacing.
37ff05c Really.
ee34bb8 Fix README?
05ac2f7 Revert "Zig: Detect visual separators in integer literals"
1701c8b Switch to Circle.
d2a1cc4 Zig: Detect visual separators in integer literals
639fa3a JavaScript: String Single Character Escape Sequences (#415)
4453913 Rewote Lexer & Added Stylus Tests
ab89a09 Added Stylus Language Support
225abae generate static binaries with goreleaser
ef102ef Add poweron architecture ppc64le to travis build
e79405b add *.env to bash lexer
c88ec01 Add QML lexer
42e9638 Support comma in go template (e.g. for range)
6665753 Improved support for Go templates (#401)

chroma - v0.8.1

Published by alecthomas about 4 years ago

Changelog

290ff86 yaml: block scalar multiline improvements.
d65f279 yaml: inline comments after literals
2365845 Improve Elixir lexer based on Pygments
6d6e9cd Update the awk lexer to better support gawk
fb0b720 Kotlin improvements around string interpolation, escaping, and generics (#392)
86ebaf3 Remove unintended changes
aac3294 Fix regex from as? to as?; add one more test case for !==
8a54f9e add many operators to kotlin
8d0d2b8 Add more keywords to kotlin lexer
477ad4a Add await and async keywords to jsx and javascript

chroma - v0.8.0

Published by alecthomas about 4 years ago

Changelog

4da591c Use EnsureNL for go lexer
e62d93f Add a timeout to regexes.
5756434 Add .editorconfig to ini lexer
391f301 Fix golangci-lint download
bac6996 added curly braces to toml lexer
2b9ea60 Split PHP into two lexers - PHP and PHTML.
1150149 Fix TypeScript keywords
57c1bd9 Added pony lexer (#372)
500529f Minor fix for name constants
8785122 Additional fixes for placeholders
155bdea Update Caddyfile lexer to fix edgecases and improve colouring
bd46305 Add Zig lexer
6896804 Add Caddyfile lexer (#363)
ee4284b Add a Rules.Merge() helper function.
4065717 feat: support HTTP/2 in HTTP lexer
2612dee add yaml test cases for more bool types and multi-line flow scalars.
2b9c82d yaml parse multiline block scalars as single StringDoc
16bde86 yaml parse for all bool keyword constant variations
684c267 yaml parse plan scalar values as literals rather than text.
705c61c yaml parse --- and ... as NameNamespace
0d4fb38 yaml parse keys as NameTag rather than Keyword
ec5955f Make single # on a line recognized as CommentSingle
8c4fe7e Add failing test case for single # in bash

chroma - v0.7.3

Published by alecthomas over 4 years ago

Changelog

809ff9b Don't emit styles that are missing a class
cc5e532 Add failing test for invalid css with allClasses
6b8ef36 Add ReasonML lexer
82f38b9 add gherkin lexer (#354)
80f4853 Improve performance of lexers.Get function (#351)
0da4bd1 Adds support for jsx blocks in typescript lexer
28041a8 Add YANG lexer (#348)
737b3a0 Update go modules

chroma - v0.7.2

Published by alecthomas over 4 years ago

Changelog

cc53faa Add option to preserve all HTML classes.
937aba1 Fixes #344.
4f3623d Fallback to HTML lexer for Markdown text.
34d9c71 Add new TokeniseOption EnsureLF (#336)
e5d9650 Add hlb lexer (#332)
866d0c8 Add lexer for SAS language (#337)
e54a758 Add testdata for terraform
c83e581 Updated terraform rules for Terraform 0.12+. Based on terraform documentation (https://www.terraform.io/docs/configuration/index.html). Added all builtin functions and updated syntax rules.
330c3bd Remove reference to now unneeded go.rice fork from go.mod
498eaa6 Fix deprecated methods in goreleaser.yml
0f6a31d rust: support raw identifiers
9e22bd6 Consider baseLineNumber when calculating the column width

chroma - v0.7.0

Published by alecthomas almost 5 years ago

Changelog

28dcb85 Fixes #305.
cfc6117 mysql: added keywords 'privileges', 'identified' and 'user'
5921c52 Add bool argument to WithClasses, WithLineNumbers etc.
d3926cc Add WithPreWrapper option

chroma - v0.6.9

Published by alecthomas almost 5 years ago

Changelog

3aaf3e5 Fix Java lexer (synced with latest Pygments).

chroma - v0.6.8

Published by alecthomas almost 5 years ago

Changelog

bbc59ac Emit error tokens when there's a group mismatch.
a1c4eaa Add J lexer
aaa94ce svg: fixed text background rectangles
611a24c embedded font in svg (#292)
73d11b3 Clear background colour for TTY formatters.
b44683e Fix linter.
b618823 Add bibtex support.
20b4f5f Revert float pattern for C++.
6acfa13 Improve info on test regeneration (#287)
22511fb added svg formatter
0ff6248 Add multi-line comments to Nim lexer (#285)

chroma - v0.6.7

Published by alecthomas about 5 years ago

Changelog

8eb6aa7 Add Language Igor (#276)
d122d30 Add ABAP lexer
b964bce Update TradingView lexer to v4 (#279)
5152194 Sync docker lexer to latest Pygments.
2f5349a Add italics support for indexed colour terminals
f2e0513 Add italics support for truecolour terminals
6a3320f Fix several errors with c++
2b493e2 Fix SCSS issue with comments.
a5a6d52 Use chroma.StyleEntries instead of map
70b7419 Add EnsureNL in TypeScript lexer config
65b5eea Adds .fth extension for Forth.
f8432cf Update issue templates
b1f0162 Update issue templates
e6a5665 Add width:100% to content when inlining styles.

chroma - v0.6.6

Published by alecthomas over 5 years ago

Changelog

be3313d Update to most recent version of go.rice fork.
bbbfbe4 Update to more recent golangci-lint.
2ec7e6c Use Kong enum for lexers, formatters and styles.

chroma - v0.6.5

Published by alecthomas over 5 years ago

Changelog

5b0cc9c Use goreleaser release binary.
ebc5ee0 Latest go.rice version.
3411213 Temporarily use go.rice fork with correct asset timestamping/versioning.
9fbb212 Render full HTML.
89e7ddc Disable spellchecking/autocomplete.
5da2819 Add cache-busting version.
c86a269 Add info block.
aa71d61 Only allow POST to /api/render.
ffa8a4f CORS support + raw HTML view + more.
bdb587c Make playground completely dynamic.
2332264 Add CSRF support to chromad.
7a7fde2 Split out chromad resources.
91b44ff Lint isses.
10cee2e Add Chroma playground.
2b84f4b Sync R lexer with Pygments.
6b98624 Update julia.go (#258)

chroma - v0.6.3

Published by alecthomas over 5 years ago

Changelog

38460d1 Clean repo before running goreleaser because it's insanely pedantic.
564f7d3 add support for matlab
c67f8fe Support SystemVerilog DPI and DPI-C import statements
e10834d README adjustments (#236)
3bae20e Add modern struct keywords to Julia lexer
b5ccb8d Improve numbers parsing in Kotlin
f4dea84 Add Turing tests
243dad6 Add Turing lexer
8fd401f Fix JS second part of division expression
1a22fed Fix Rust raw string literals
af4cf6a Fix capitalisation mistake in lexer variable
15bc683 Remove comment and CPP name
c53abb0 Add Arduino lexer
3159487 Recognise hexadecimal colour values in TradingView lexer
8548c73 Move test assertion generation into testcase
6227d9b Add missing TradingView tokens
4b6319e Add basic graphql support
3c6b341 Add additional information about style to README
8ce6ac6 Enable EnsureNL for TradingView and C# lexers
abbe00c Provide some default styles for RRT (fixes #212) (#219)
da5ac60 Add golangci-lint and fix all lint issues.
e27f19c Remove unnecessary loop.
c4bec47 Don't break Markdown on multiple bolds on a single line.
2a59c2c Synthesise meta style-entries on demand.
69c9a26 Expose Colour.BrightenOrDarken (useful for #211).