summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Sojka <Steven.Sojka@tdameritrade.com>2020-06-15 13:13:26 -0500
committerSteven Sojka <Steven.Sojka@tdameritrade.com>2020-06-15 15:24:05 -0500
commit7bc746f3f0f2e8195c39c3ff3029379ad39d9f33 (patch)
tree538ea0128086953d03525177d01038c032a47175
parentdd7e67ddb4d9459d6f786a88a41655833bdd9d16 (diff)
feat(lang): add json highlights
-rw-r--r--README.md2
-rw-r--r--queries/json/highlights.scm13
2 files changed, 14 insertions, 1 deletions
diff --git a/README.md b/README.md
index 6a45ebee..3df34033 100644
--- a/README.md
+++ b/README.md
@@ -162,7 +162,7 @@ List of currently supported languages:
- [x] javascript (maintained by @steelsojka)
- [x] typescript (maintained by @steelsojka)
- [ ] tsx
-- [ ] json
+- [x] json (maintained by @steelsojka)
- [x] html (maintained by @TravonteD)
- [ ] csharp
- [ ] swift
diff --git a/queries/json/highlights.scm b/queries/json/highlights.scm
new file mode 100644
index 00000000..bdc35ad9
--- /dev/null
+++ b/queries/json/highlights.scm
@@ -0,0 +1,13 @@
+(true) @boolean
+(false) @boolean
+(null) @constant.builtin
+(number) @number
+(pair key: (string) @label)
+(pair value: (string) @string)
+(string_content (escape_sequence) @string.escape)
+(ERROR) @error
+"," @punctuation.delimiter
+"[" @punctuation.bracket
+"]" @punctuation.bracket
+"{" @punctuation.bracket
+"}" @punctuation.bracket