on master help sign in
add support for json5 (#8473)

* add json5 language * docgen

commit93e54fa0c88dc0c8761242b14b11a5aca79c6faf authorDS/Charlie <82801887+ds-cbo@users.noreply.github.com> dateSat 7 Oct 2023, 00:29 (3 years ago) parent68fce3e
3 files changed+28
book/src/generated/lang-support.md+1 languages.toml+16 runtime/queries/json5/highlights.scm+11
book/src/generated/lang-support.md+1
@@ -76,6 +76,7 @@
7676| jinja | ✓ | | | |
7777| jsdoc | ✓ | | | |
7878| json | ✓ | | ✓ | `vscode-json-language-server` |
79+| json5 | ✓ | | | |
7980| jsonnet | ✓ | | | `jsonnet-language-server` |
8081| jsx | ✓ | ✓ | ✓ | `typescript-language-server` |
8182| julia | ✓ | ✓ | ✓ | `julia` |
languages.toml+16
@@ -348,6 +348,22 @@ indent = { tab-width = 2, unit = " " }
348348name = "json"
349349source = { git = "https://github.com/tree-sitter/tree-sitter-json", rev = "73076754005a460947cafe8e03a8cf5fa4fa2938" }
350350
351+
352+[[language]]
353+name = "json5"
354+scope = "source.json5"
355+injection-regex = "json5"
356+file-types = ["json5"]
357+roots = []
358+language-servers = []
359+comment-token = "//"
360+indent = { tab-width = 4, unit = " " }
361+# https://json5.org
362+
363+[[grammar]]
364+name = "json5"
365+source = { git = "https://github.com/Joakker/tree-sitter-json5", rev = "c23f7a9b1ee7d45f516496b1e0e4be067264fa0d" }
366+
351367[[language]]
352368name = "c"
353369scope = "source.c"
runtime/queries/json5/highlights.scmnew file+11
@@ -0,0 +1,11 @@
1+(string) @string
2+
3+(identifier) @constant
4+
5+(number) @constant.numeric
6+
7+(null) @constant.builtin
8+
9+[(true) (false)] @constant.builtin.boolean
10+
11+(comment) @comment