Skip to content

Commit

Permalink
add support for json5 (#8473)
Browse files Browse the repository at this point in the history
* add json5 language

* docgen
  • Loading branch information
ds-cbo authored Oct 6, 2023
1 parent 68fce3e commit 93e54fa
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions book/src/generated/lang-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
| jinja || | | |
| jsdoc || | | |
| json || || `vscode-json-language-server` |
| json5 || | | |
| jsonnet || | | `jsonnet-language-server` |
| jsx |||| `typescript-language-server` |
| julia |||| `julia` |
Expand Down
16 changes: 16 additions & 0 deletions languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,22 @@ indent = { tab-width = 2, unit = " " }
name = "json"
source = { git = "https://github.com/tree-sitter/tree-sitter-json", rev = "73076754005a460947cafe8e03a8cf5fa4fa2938" }


[[language]]
name = "json5"
scope = "source.json5"
injection-regex = "json5"
file-types = ["json5"]
roots = []
language-servers = []
comment-token = "//"
indent = { tab-width = 4, unit = " " }
# https://json5.org

[[grammar]]
name = "json5"
source = { git = "https://github.com/Joakker/tree-sitter-json5", rev = "c23f7a9b1ee7d45f516496b1e0e4be067264fa0d" }

[[language]]
name = "c"
scope = "source.c"
Expand Down
11 changes: 11 additions & 0 deletions runtime/queries/json5/highlights.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
(string) @string

(identifier) @constant

(number) @constant.numeric

(null) @constant.builtin

[(true) (false)] @constant.builtin.boolean

(comment) @comment

0 comments on commit 93e54fa

Please sign in to comment.