diff --git a/queries/highlights.scm b/queries/highlights.scm index 9541314..9eae8a0 100644 --- a/queries/highlights.scm +++ b/queries/highlights.scm @@ -9,6 +9,22 @@ (integer_literal ("-") @operator) ; }}} +; Punctuation {{{ +[ + "," + ":" +] @punctuation.delimiter + +[ + "(" + ")" + "[" + "]" + "{" + "}" +] @punctuation.bracket +; }}} + ; Literal {{{ (boolean_literal) @boolean diff --git a/test/highlight/punctuation.bp b/test/highlight/punctuation.bp new file mode 100644 index 0000000..bc00194 --- /dev/null +++ b/test/highlight/punctuation.bp @@ -0,0 +1,15 @@ +foo ( + // <- punctuation.bracket + bar = [ + //^ punctuation.bracket + { + // <- punctuation.bracket + key: "value", + // ^ punctuation.delimiter + // ^ punctuation.delimiter + }, + // <- punctuation.bracket + ] + // <- punctuation.bracket +) +// <- punctuation.bracket