Skip to content

Commit 1869195

Browse files
committed
Updates
1 parent 70afa29 commit 1869195

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

queries/glimmer/highlights.scm

+11-11
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
; Tags that start with a lower case letter are HTML tags
33
; We'll also use this highlighting for named blocks (which start with `:`)
44
((tag_name) @tag
5-
(#lua-match? @tag "^(:)?[%l]"))
5+
(#lua-match? @tag "^:?[%l]"))
66

77
; Tags that start with a capital letter are Glimmer components
88
((tag_name) @constructor
99
(#lua-match? @constructor "^%u"))
1010

11-
(attribute_name) @property
11+
(attribute_name) @attribute
1212

1313
(string_literal) @string
1414

@@ -26,17 +26,17 @@
2626

2727
; Highlight `if`/`each`/`let`
2828
(block_statement_start
29-
path: (identifier) @conditional)
29+
path: (identifier) @keyword.conditional)
3030

3131
(block_statement_end
32-
path: (identifier) @conditional)
32+
path: (identifier) @keyword.conditional)
3333

3434
((mustache_statement
35-
(identifier) @conditional)
36-
(#lua-match? @conditional "else"))
35+
(identifier) @keyword.conditional)
36+
(#lua-match? @keyword.conditional "else"))
3737

3838
; == Mustache Statements ===
39-
; Hightlight the whole statement, to color brackets and separators
39+
; Highlight the whole statement, to color brackets and separators
4040
(mustache_statement) @tag.delimiter
4141

4242
; An identifier in a mustache expression is a variable
@@ -85,11 +85,11 @@
8585
(identifier) @function)
8686
(identifier) @function
8787
])
88-
(#any-of? @function "if" "yield"))
88+
(#not-any-of? @function "if" "yield"))
8989

9090
((helper_invocation
91-
helper: (identifier) @conditional)
92-
(#eq? @conditional "if"))
91+
helper: (identifier) @keyword.conditional)
92+
(#eq? @keyword.conditional "if"))
9393

9494
((helper_invocation
9595
helper: (identifier) @keyword)
@@ -98,7 +98,7 @@
9898
(hash_pair
9999
key: (identifier) @property)
100100

101-
(comment_statement) @comment
101+
(comment_statement) @comment @spell
102102

103103
(attribute_node
104104
"=" @operator)

0 commit comments

Comments
 (0)