Skip to content

Commit

Permalink
add rainbow bracket queries
Browse files Browse the repository at this point in the history
  • Loading branch information
the-mikedavis committed Jun 29, 2022
1 parent eb22a60 commit 1e323cf
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
12 changes: 10 additions & 2 deletions runtime/queries/erlang/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@

(binary_operator operator: _ @operator)
(unary_operator operator: _ @operator)
["/" ":" "#" "->"] @operator
["/" ":" "->"] @operator

(tripledot) @comment.discard

Expand All @@ -118,6 +118,14 @@

; Punctuation
["," "." "-" ";"] @punctuation.delimiter
["(" ")" "{" "}" "[" "]" "<<" ">>"] @punctuation.bracket

(list "[" @rainbow "]" @rainbow)
(record "#" @rainbow "{" @rainbow "}" @rainbow)
(map "#" @rainbow "{" @rainbow "}" @rainbow)
(map_update "{" @rainbow "}" @rainbow)
(tuple "{" @rainbow "}" @rainbow)
(arguments "(" @rainbow ")" @rainbow)
(parenthesized_expression "(" @rainbow ")" @rainbow)
(bitstring "<<" @rainbow ">>" @rainbow)

; (ERROR) @error
10 changes: 4 additions & 6 deletions runtime/queries/toml/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@

"=" @operator

"[" @punctuation.bracket
"]" @punctuation.bracket
"[[" @punctuation.bracket
"]]" @punctuation.bracket
"{" @punctuation.bracket
"}" @punctuation.bracket
(table_array_element "[[" @rainbow "]]" @rainbow)
(table "[" @rainbow "]" @rainbow)
(array "[" @rainbow "]" @rainbow)
(inline_table "{" @rainbow "}" @rainbow)
6 changes: 6 additions & 0 deletions runtime/queries/tsq/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
((query . (comment) @keyword.directive)
(#match? @keyword.directive "^;\ +inherits *:"))

(group "(" @rainbow ")" @rainbow)
(named_node "(" @rainbow ")" @rainbow)
(wildcard_node "(" @rainbow ")" @rainbow)
(predicate "(" @rainbow ")" @rainbow)
(alternation "[" @rainbow "]" @rainbow)

[
"("
")"
Expand Down

0 comments on commit 1e323cf

Please sign in to comment.