From e5d969ecb3c29145ebdb374c05278a254db9744d Mon Sep 17 00:00:00 2001 From: Starkiller645 <59282118+Starkiller645@users.noreply.github.com> Date: Sun, 11 Oct 2020 09:44:44 +0100 Subject: [PATCH] chroma: add page (#4603) --- pages/common/chroma.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 pages/common/chroma.md diff --git a/pages/common/chroma.md b/pages/common/chroma.md new file mode 100644 index 0000000000..827eb11b8a --- /dev/null +++ b/pages/common/chroma.md @@ -0,0 +1,16 @@ +# chroma + +> Chroma is a general-purpose syntax highlighting library and corresponding command, for Go. +> More information: . + +- Highlight a source file with python lexer and output to terminal: + +`chroma --lexer="{{python}}" {{source_file}}` + +- Highlight a source file with Go lexer and output to a HTML file: + +`chroma --lexer="{{go}}" --formatter="{{html}}" {{source_file}} > {{html_file}}` + +- Highlight a source file with C++ lexer and output to an SVG image, using the Monokai style: + +`chroma --lexer="{{c++}}" --formatter="{{svg}}" --syle="{{monokai}}" {{source_file}} > {{svg_file}}`