chroma

A general purpose syntax highlighter in pure Go

MIT License

Downloads
91
Stars
4.2K
Committers
239

Bot releases are hidden (Show)

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).

chroma - v0.6.2

Published by alecthomas almost 6 years ago

Changelog

881a441 Don't keep trailing empty tokens when splitting tokens by line.
4eb0355 Formatting.

chroma - v0.6.1

Published by alecthomas almost 6 years ago

Changelog

3b3f74c Fix stdin mode in chroma tool.
3175fa5 Support go modules + VB.Net lexer.
813e33c Fix YAML pipe symbol (issue #194)
022b6f4 Fix --json.
fb4c38e Fix build (see #190).
a4f1799 move SplitTokensIntoLines into chroma/iterator.go, fixes issue #190
9c3abea Tokens by value (#187)

chroma - v0.6.0

Published by alecthomas almost 6 years ago

Changelog

5a47317 Improve Go lexer to detect functions (NameFunction)
01e1883 Elixir: add underscore separators for hex, oct, bin
c0b13da Added missing 'to' keyword to TradingView lexer
0955241 Add HTTP unit test
eafa8e1 Properly syntax highlight HTTP body
e9d4ea1 Add missing lexers to README
a24ed6d List lexers in README in table (#176)
1ab0293 Add test for Bash lexer (#172)
c4123fc #170 Add lexer for systemd config files (#171)
e36baa2 Add option to prevent surroundign pre tags
0ee9168 Fixes #168 (error with bash lexer)
3575c5f Fix line endings in tradingview fixture.
d5ca12b Merge pull request #166 from Jos512/tradingview
fccc5bb First version of TradingView lexer

chroma - v0.5.0

Published by alecthomas about 6 years ago

Changelog

5d7fef2 Merge pull request #157 from kaushalmodi/nim_underscore
cccad29 Merge pull request #158 from kaushalmodi/improve-org-mode-support
e6c740a Merge pull request #161 from kaushalmodi/add-genericunderline-class
371820d Assign .gl class to GenericUnderline; add CSS rules for the same
7e453ef Add more Org mode syntax support
a85919f Allow standalone _ to be recognized as identifier in Nim
3fb10fb Merge pull request #156 from kaushalmodi/add-org-mode
e4dff9a Add Org mode lexer (https://orgmode.org)
91b1228 Added Ballerina - https://ballerina.io (#154)
0c0b382 Add .gitconfig to Ini lexer filenames.
0961f82 Fix nearest colour matching.
1da70b2 Merge pull request #152 from pzl/monkeyc
e80511c Document LineNumbersInTable().
b18849c add jungle lexer
8387f77 add monkeyc lexer
1e3d94a Merge pull request #151 from pzl/openscad
a2f2f3c add openscad lexer
d7b2ed2 Merge pull request #149 from kenshaw/fix-dollar-strings
95d0a93 Fix Dollar-Quoted Strings (postgres + cql)
307ceef Merge pull request #148 from kenshaw/add-cql-lexer
2eb5cac Add Cassandra CQL lexer
1b755a9 c++: fix highlighting of the 'class' keyword
7f4d42f Add EnsureNL to Rust lexer; Add test data for Rust lexer
222a1f0 Don't require --html to write styles.
33cc533 ✨ New styles from solarized styles family
cd79368 Create plaintext lexer (#138)
17c7658 Add link to the Chroma Style Gallery
6b1131c Fix package name in README.
51d250f Add testdata for dart
85c342e Add test data for gdscript
5640f89 Revert #78.
5e8fe40 Update list of supported lexers.
6a5b719 Correct handling of whitespace in Go templates.
29681d8 Correctly handle := and $
59f5549 Fix DelegatingLexer.
5ef2d37 Analysre for PHP.
b21a6da Human readable name for Go template lexers.
f315512 Add support for Go templates.
db6920e Implemented delegating lexer.
15a009f Add DelegatingLexer.
8f28919 Use alecthomas/assert.

chroma - v0.3.0

Published by alecthomas over 6 years ago

Changelog

563aadc Moved lexers into alphabetical sub-packages.
50a6b50 Slightly smarter YAML.
e4cd164 Ensure that HTML code column expands to full width of container.
03fd038 fix func compressStyle(s string) for CSS Shorthand properties
33dd172 fix PHP comment highlighting bug (#81)
205105f Fixed newlines at end of C++ files.
a35b8fe Fix incorrect javascript comment highlight (#104)
35126f9 Implement rudimentary JSX lexer based on https://github.com/fcurella/jsx-lexer/blob/master/jsx/lexer.py
5964ce9 Add Solidity lexer
38cc9bd Deduplicate some strings in the Kotlin lexer.
9653d70 Kotlin lexer improvements fixes #93
ce92184 Deduplicate a bunch more text, in Python3 lexer this time.
4afa8aa Deduplicate a bunch of text in Scala lexer.
71ddf55 Fix README for test fixtures.


Automated with GoReleaser
Built with go version go1.9 linux/amd64