|
2 | 2 | ; Tags that start with a lower case letter are HTML tags
|
3 | 3 | ; We'll also use this highlighting for named blocks (which start with `:`)
|
4 | 4 | ((tag_name) @tag
|
5 |
| - (#lua-match? @tag "^(:)?[%l]")) |
| 5 | + (#lua-match? @tag "^:?[%l]")) |
6 | 6 |
|
7 | 7 | ; Tags that start with a capital letter are Glimmer components
|
8 | 8 | ((tag_name) @constructor
|
9 | 9 | (#lua-match? @constructor "^%u"))
|
10 | 10 |
|
11 |
| -(attribute_name) @property |
| 11 | +(attribute_name) @attribute |
12 | 12 |
|
13 | 13 | (string_literal) @string
|
14 | 14 |
|
|
26 | 26 |
|
27 | 27 | ; Highlight `if`/`each`/`let`
|
28 | 28 | (block_statement_start
|
29 |
| - path: (identifier) @conditional) |
| 29 | + path: (identifier) @keyword.conditional) |
30 | 30 |
|
31 | 31 | (block_statement_end
|
32 |
| - path: (identifier) @conditional) |
| 32 | + path: (identifier) @keyword.conditional) |
33 | 33 |
|
34 | 34 | ((mustache_statement
|
35 |
| - (identifier) @conditional) |
36 |
| - (#lua-match? @conditional "else")) |
| 35 | + (identifier) @keyword.conditional) |
| 36 | + (#lua-match? @keyword.conditional "else")) |
37 | 37 |
|
38 | 38 | ; == Mustache Statements ===
|
39 |
| -; Hightlight the whole statement, to color brackets and separators |
| 39 | +; Highlight the whole statement, to color brackets and separators |
40 | 40 | (mustache_statement) @tag.delimiter
|
41 | 41 |
|
42 | 42 | ; An identifier in a mustache expression is a variable
|
|
85 | 85 | (identifier) @function)
|
86 | 86 | (identifier) @function
|
87 | 87 | ])
|
88 |
| - (#any-of? @function "if" "yield")) |
| 88 | + (#not-any-of? @function "if" "yield")) |
89 | 89 |
|
90 | 90 | ((helper_invocation
|
91 |
| - helper: (identifier) @conditional) |
92 |
| - (#eq? @conditional "if")) |
| 91 | + helper: (identifier) @keyword.conditional) |
| 92 | + (#eq? @keyword.conditional "if")) |
93 | 93 |
|
94 | 94 | ((helper_invocation
|
95 | 95 | helper: (identifier) @keyword)
|
|
98 | 98 | (hash_pair
|
99 | 99 | key: (identifier) @property)
|
100 | 100 |
|
101 |
| -(comment_statement) @comment |
| 101 | +(comment_statement) @comment @spell |
102 | 102 |
|
103 | 103 | (attribute_node
|
104 | 104 | "=" @operator)
|
|
0 commit comments