You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add helper script to generate supported langs markdown table (#1170)
**TL;DR: added a python script that generates a "supported languages"
markdown table, making it easier to keep the table in the readme up to
date**
---
This PR adds a Python script `_tools/format_supported_langs.py` which
accepts the output of `chroma --list` over stdin and outputs a Markdown
table which can be added to the Supported Languages section of the
README. Here's how I called the script:
```sh
env -C cmd/chroma go run . | uv run _tools/format_supported_langs.py
```
I chose not to try automating edits to the README, and leave it up to
the invoker to replace the table in the readme with this script's
output. I also updated the table in the README because it's missing a
few languages.
Hopefully this can help with the maintenance burden.
| F | Factor, Fennel, Fish, Forth, Fortran, FortranFixed, FSharp
45
45
| G | GAS, GDScript, GDScript3, Gemtext, Genshi, Genshi HTML, Genshi Text, Gherkin, Gleam, GLSL, Gnuplot, Go, Go HTML Template, Go Template, Go Text Template, GraphQL, Groff, Groovy
46
46
| H | Handlebars, Hare, Haskell, Haxe, HCL, Hexdump, HLB, HLSL, HolyC, HTML, HTTP, Hy
| V | V, V shell, Vala, VB.net, verilog, VHDL, VHS, VimL, vue
61
-
| W | WDTE, WebGPU Shading Language, WebVTT, Whiley
61
+
| W | WDTE, WebAssembly Text Format, WebGPU Shading Language, WebVTT, Whiley
62
62
| X | XML, Xorg
63
63
| Y | YAML, YANG
64
64
| Z | Z80 Assembly, Zed, Zig
@@ -211,7 +211,7 @@ the following:
211
211
```sh
212
212
uv run --script _tools/pygments2chroma_xml.py \
213
213
pygments.lexers.jvm.KotlinLexer \
214
-
> lexers/embedded/kotlin.xml
214
+
> lexers/embedded/kotlin.xml
215
215
```
216
216
217
217
A list of all lexers available in Pygments can be found in [pygments-lexers.txt](https://github.com/alecthomas/chroma/blob/master/pygments-lexers.txt).
0 commit comments