aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/cpon
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/queries/cpon')
-rw-r--r--runtime/queries/cpon/highlights.scm26
-rw-r--r--runtime/queries/cpon/indents.scm12
2 files changed, 38 insertions, 0 deletions
diff --git a/runtime/queries/cpon/highlights.scm b/runtime/queries/cpon/highlights.scm
new file mode 100644
index 00000000..f85caf46
--- /dev/null
+++ b/runtime/queries/cpon/highlights.scm
@@ -0,0 +1,26 @@
+[
+ (true)
+ (false)
+] @constant.builtin.boolean
+(null) @constant.builtin
+(number) @constant.numeric
+(pair
+ key: (_) @keyword)
+(ipair
+ key: (_) @keyword)
+(mpair
+ key: (_) @keyword)
+
+(string) @string
+(escape_sequence) @constant.character.escape
+(ERROR) @error
+
+"," @punctuation.delimiter
+[
+ "["
+ "]"
+ "{"
+ "}"
+ "<"
+ ">"
+] @punctuation.bracket
diff --git a/runtime/queries/cpon/indents.scm b/runtime/queries/cpon/indents.scm
new file mode 100644
index 00000000..53c82767
--- /dev/null
+++ b/runtime/queries/cpon/indents.scm
@@ -0,0 +1,12 @@
+[
+ (meta)
+ (map)
+ (imap)
+ (array)
+] @indent
+
+[
+ "]"
+ "}"
+ ">"
+] @outdent