aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/cpon
diff options
context:
space:
mode:
authorFanda Vacek2022-05-01 14:34:46 +0000
committerGitHub2022-05-01 14:34:46 +0000
commit166818359030cd1649327160c9020d943a8de244 (patch)
tree035f3756290d151247ff164711f55227ca4ed91f /runtime/queries/cpon
parentede01b5f1eb072022cb320d7ffddd0ecf6e1dab6 (diff)
feat(lang): Cpon lang support (#2355)
Co-authored-by: Fanda Vacek <fvacek@elektroline.cz>
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