on master help sign in
add support for json5 (#8473)
93e54faDS/Charlie
book/src/generated/lang-support.md+1
@@ -76,6 +76,7 @@
76| jinja | ✓ | | | |
76| jinja | ✓ | | | |
77| jsdoc | ✓ | | | |
77| jsdoc | ✓ | | | |
78| json | ✓ | | ✓ | `vscode-json-language-server` |
78| json | ✓ | | ✓ | `vscode-json-language-server` |
79+| json5 | ✓ | | | |
79| jsonnet | ✓ | | | `jsonnet-language-server` |
80| jsonnet | ✓ | | | `jsonnet-language-server` |
80| jsx | ✓ | ✓ | ✓ | `typescript-language-server` |
81| jsx | ✓ | ✓ | ✓ | `typescript-language-server` |
81| julia | ✓ | ✓ | ✓ | `julia` |
82| julia | ✓ | ✓ | ✓ | `julia` |
languages.toml+16
@@ -348,6 +348,22 @@ indent = { tab-width = 2, unit = " " }
348name = "json"
348name = "json"
349source = { git = "https://github.com/tree-sitter/tree-sitter-json", rev = "73076754005a460947cafe8e03a8cf5fa4fa2938" }
349source = { git = "https://github.com/tree-sitter/tree-sitter-json", rev = "73076754005a460947cafe8e03a8cf5fa4fa2938" }
350
350
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+
351[[language]]
367[[language]]
352name = "c"
368name = "c"
353scope = "source.c"
369scope = "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