feat: add cpon

This commit is contained in:
Amaan Qureshi 2023-02-23 18:44:10 -05:00 committed by Stephan Seitz
parent 853b1ab39a
commit c38646edf2
8 changed files with 93 additions and 0 deletions

5
queries/cpon/folds.scm Normal file
View file

@ -0,0 +1,5 @@
[
(meta_map)
(map)
(array)
] @fold

View file

@ -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

23
queries/cpon/indents.scm Normal file
View file

@ -0,0 +1,23 @@
[
(meta_map)
(map)
(imap)
(array)
] @indent
[
"]"
"}"
">"
] @indent_end
[ "{" "}" ] @branch
[ "[" "]" ] @branch
[ "<" ">" ] @branch
[
(ERROR)
(comment)
] @auto

View file

@ -0,0 +1 @@
(comment) @comment

7
queries/cpon/locals.scm Normal file
View file

@ -0,0 +1,7 @@
[
(document)
(meta_map)
(map)
(array)
] @scope