aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--SUPPORTED_LANGUAGES.md2
-rw-r--r--plugin/filetypes.lua1
-rw-r--r--runtime/queries/json/highlights.scm2
-rw-r--r--runtime/queries/json/indents.scm2
-rw-r--r--runtime/queries/json/injections.scm2
5 files changed, 8 insertions, 1 deletions
diff --git a/SUPPORTED_LANGUAGES.md b/SUPPORTED_LANGUAGES.md
index 695171c15..0000baa6d 100644
--- a/SUPPORTED_LANGUAGES.md
+++ b/SUPPORTED_LANGUAGES.md
@@ -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
diff --git a/plugin/filetypes.lua b/plugin/filetypes.lua
index 5e23adffd..7759c1f5c 100644
--- a/plugin/filetypes.lua
+++ b/plugin/filetypes.lua
@@ -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' },
diff --git a/runtime/queries/json/highlights.scm b/runtime/queries/json/highlights.scm
index 85915285a..61f087166 100644
--- a/runtime/queries/json/highlights.scm
+++ b/runtime/queries/json/highlights.scm
@@ -36,3 +36,5 @@
((escape_sequence) @conceal
(#eq? @conceal "\\\"")
(#set! conceal "\""))
+
+(comment) @comment @spell
diff --git a/runtime/queries/json/indents.scm b/runtime/queries/json/indents.scm
index 8274ee3d5..3680289bd 100644
--- a/runtime/queries/json/indents.scm
+++ b/runtime/queries/json/indents.scm
@@ -7,3 +7,5 @@
"}"
"]"
] @indent.branch
+
+(comment) @indent.ignore
diff --git a/runtime/queries/json/injections.scm b/runtime/queries/json/injections.scm
new file mode 100644
index 000000000..2f0e58eb6
--- /dev/null
+++ b/runtime/queries/json/injections.scm
@@ -0,0 +1,2 @@
+((comment) @injection.content
+ (#set! injection.language "comment"))