Skip to content

Commit 1e323cf

Browse files
committed
add rainbow bracket queries
1 parent eb22a60 commit 1e323cf

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

runtime/queries/erlang/highlights.scm

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292

9393
(binary_operator operator: _ @operator)
9494
(unary_operator operator: _ @operator)
95-
["/" ":" "#" "->"] @operator
95+
["/" ":" "->"] @operator
9696

9797
(tripledot) @comment.discard
9898

@@ -118,6 +118,14 @@
118118

119119
; Punctuation
120120
["," "." "-" ";"] @punctuation.delimiter
121-
["(" ")" "{" "}" "[" "]" "<<" ">>"] @punctuation.bracket
121+
122+
(list "[" @rainbow "]" @rainbow)
123+
(record "#" @rainbow "{" @rainbow "}" @rainbow)
124+
(map "#" @rainbow "{" @rainbow "}" @rainbow)
125+
(map_update "{" @rainbow "}" @rainbow)
126+
(tuple "{" @rainbow "}" @rainbow)
127+
(arguments "(" @rainbow ")" @rainbow)
128+
(parenthesized_expression "(" @rainbow ")" @rainbow)
129+
(bitstring "<<" @rainbow ">>" @rainbow)
122130

123131
; (ERROR) @error

runtime/queries/toml/highlights.scm

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@
2727

2828
"=" @operator
2929

30-
"[" @punctuation.bracket
31-
"]" @punctuation.bracket
32-
"[[" @punctuation.bracket
33-
"]]" @punctuation.bracket
34-
"{" @punctuation.bracket
35-
"}" @punctuation.bracket
30+
(table_array_element "[[" @rainbow "]]" @rainbow)
31+
(table "[" @rainbow "]" @rainbow)
32+
(array "[" @rainbow "]" @rainbow)
33+
(inline_table "{" @rainbow "}" @rainbow)

runtime/queries/tsq/highlights.scm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
((query . (comment) @keyword.directive)
99
(#match? @keyword.directive "^;\ +inherits *:"))
1010

11+
(group "(" @rainbow ")" @rainbow)
12+
(named_node "(" @rainbow ")" @rainbow)
13+
(wildcard_node "(" @rainbow ")" @rainbow)
14+
(predicate "(" @rainbow ")" @rainbow)
15+
(alternation "[" @rainbow "]" @rainbow)
16+
1117
[
1218
"("
1319
")"

0 commit comments

Comments
 (0)