summaryrefslogtreecommitdiff
path: root/queries/hjson
diff options
context:
space:
mode:
authorkghugo <hugosum.dev@protonmail.com>2021-09-18 21:15:37 +0100
committerStephan Seitz <stephan.seitz@fau.de>2021-09-19 14:19:20 +0200
commitd5e87dde100a5a3377043fc55846c97b03b6b01f (patch)
tree5cfb7c9c15dff4898f7be77e6eafe7ef7d96754f /queries/hjson
parent5fa6e274274210f34de37487d439cbbbf3a8a4d3 (diff)
Support hjson
Diffstat (limited to 'queries/hjson')
-rw-r--r--queries/hjson/folds.scm1
-rw-r--r--queries/hjson/highlights.scm16
-rw-r--r--queries/hjson/indents.scm3
-rw-r--r--queries/hjson/injections.scm1
-rw-r--r--queries/hjson/locals.scm1
5 files changed, 22 insertions, 0 deletions
diff --git a/queries/hjson/folds.scm b/queries/hjson/folds.scm
new file mode 100644
index 00000000..41269219
--- /dev/null
+++ b/queries/hjson/folds.scm
@@ -0,0 +1 @@
+; inherits: json
diff --git a/queries/hjson/highlights.scm b/queries/hjson/highlights.scm
new file mode 100644
index 00000000..c8eed139
--- /dev/null
+++ b/queries/hjson/highlights.scm
@@ -0,0 +1,16 @@
+(true) @boolean
+(false) @boolean
+(null) @constant.builtin
+(number) @number
+(pair key: (string) @label)
+(pair value: (string) @string)
+(array (string) @string)
+; (string_content (escape_sequence) @string.escape)
+(ERROR) @error
+; "," @punctuation.delimiter
+"[" @punctuation.bracket
+"]" @punctuation.bracket
+"{" @punctuation.bracket
+"}" @punctuation.bracket
+
+(comment) @comment
diff --git a/queries/hjson/indents.scm b/queries/hjson/indents.scm
new file mode 100644
index 00000000..26a42eed
--- /dev/null
+++ b/queries/hjson/indents.scm
@@ -0,0 +1,3 @@
+; inherits: json
+
+(comment) @ignore
diff --git a/queries/hjson/injections.scm b/queries/hjson/injections.scm
new file mode 100644
index 00000000..4bb7d675
--- /dev/null
+++ b/queries/hjson/injections.scm
@@ -0,0 +1 @@
+(comment) @comment
diff --git a/queries/hjson/locals.scm b/queries/hjson/locals.scm
new file mode 100644
index 00000000..41269219
--- /dev/null
+++ b/queries/hjson/locals.scm
@@ -0,0 +1 @@
+; inherits: json