feat(json): add support for jsonc files

This commit is contained in:
Christian Clason
2025-12-06 11:12:18 +01:00
committed by Christian Clason
parent d2350758b3
commit 9d47b2558b
5 changed files with 8 additions and 1 deletions

View File

@@ -148,7 +148,7 @@ html_tags (queries only)[^html_tags] | unstable | `H IJ ` | @TravonteD
[jinja_inline](https://github.com/cathaysia/tree-sitter-jinja)[^jinja_inline] | unstable | `H  J ` | @cathaysia
[jq](https://github.com/flurie/tree-sitter-jq) | unstable | `H  JL` | @ObserverOfTime
[jsdoc](https://github.com/tree-sitter/tree-sitter-jsdoc) | unstable | `H    ` | @steelsojka
[json](https://github.com/tree-sitter/tree-sitter-json) | unstable | `HFI L` | @steelsojka
[json](https://github.com/tree-sitter/tree-sitter-json) | unstable | `HFIJL` | @steelsojka
[json5](https://github.com/Joakker/tree-sitter-json5) | unstable | `H  J ` | @Joakker
[jsonnet](https://github.com/sourcegraph/tree-sitter-jsonnet) | unstable | `HF JL` | @nawordar
jsx (queries only)[^jsx] | unstable | `HFIJ ` | @steelsojka

View File

@@ -24,6 +24,7 @@ local filetypes = {
ini = { 'confini', 'dosini' },
janet_simple = { 'janet' },
javascript = { 'javascriptreact', 'ecma', 'ecmascript', 'jsx', 'js' },
json = { 'jsonc' },
glimmer_javascript = { 'javascript.glimmer' },
latex = { 'tex' },
linkerscript = { 'ld' },

View File

@@ -36,3 +36,5 @@
((escape_sequence) @conceal
(#eq? @conceal "\\\"")
(#set! conceal "\""))
(comment) @comment @spell

View File

@@ -7,3 +7,5 @@
"}"
"]"
] @indent.branch
(comment) @indent.ignore

View File

@@ -0,0 +1,2 @@
((comment) @injection.content
(#set! injection.language "comment"))