aboutsummaryrefslogtreecommitdiffstats
path: root/queries
diff options
context:
space:
mode:
Diffstat (limited to 'queries')
-rw-r--r--queries/cpon/folds.scm5
-rw-r--r--queries/cpon/highlights.scm45
-rw-r--r--queries/cpon/indents.scm23
-rw-r--r--queries/cpon/injections.scm1
-rw-r--r--queries/cpon/locals.scm7
5 files changed, 81 insertions, 0 deletions
diff --git a/queries/cpon/folds.scm b/queries/cpon/folds.scm
new file mode 100644
index 000000000..02feec4e1
--- /dev/null
+++ b/queries/cpon/folds.scm
@@ -0,0 +1,5 @@
+[
+ (meta_map)
+ (map)
+ (array)
+] @fold
diff --git a/queries/cpon/highlights.scm b/queries/cpon/highlights.scm
new file mode 100644
index 000000000..f08647293
--- /dev/null
+++ b/queries/cpon/highlights.scm
@@ -0,0 +1,45 @@
+; Literals
+
+(string) @string
+(escape_sequence) @string.escape
+
+(hex_blob
+ "x" @character.special
+ (_) @string)
+
+(esc_blob
+ "b" @character.special
+ (_) @string)
+
+(datetime
+ "d" @character.special
+ (_) @string.special)
+
+(number) @number
+
+(float) @float
+
+(boolean) @boolean
+
+(null) @constant.builtin
+
+; Punctuation
+
+[
+ ","
+ ":"
+] @punctuation.delimiter
+
+[ "{" "}" ] @punctuation.bracket
+
+[ "[" "]" ] @punctuation.bracket
+
+[ "<" ">" ] @punctuation.bracket
+
+; Comments
+
+(comment) @comment @spell
+
+; Errors
+
+(ERROR) @error
diff --git a/queries/cpon/indents.scm b/queries/cpon/indents.scm
new file mode 100644
index 000000000..477ea83b5
--- /dev/null
+++ b/queries/cpon/indents.scm
@@ -0,0 +1,23 @@
+[
+ (meta_map)
+ (map)
+ (imap)
+ (array)
+] @indent
+
+[
+ "]"
+ "}"
+ ">"
+] @indent_end
+
+[ "{" "}" ] @branch
+
+[ "[" "]" ] @branch
+
+[ "<" ">" ] @branch
+
+[
+ (ERROR)
+ (comment)
+] @auto
diff --git a/queries/cpon/injections.scm b/queries/cpon/injections.scm
new file mode 100644
index 000000000..4bb7d675d
--- /dev/null
+++ b/queries/cpon/injections.scm
@@ -0,0 +1 @@
+(comment) @comment
diff --git a/queries/cpon/locals.scm b/queries/cpon/locals.scm
new file mode 100644
index 000000000..c1854af91
--- /dev/null
+++ b/queries/cpon/locals.scm
@@ -0,0 +1,7 @@
+[
+ (document)
+
+ (meta_map)
+ (map)
+ (array)
+] @scope