Debian Codegraph @

runtime/queries/heex/highlights.scm

raw symbols SCIP
1 ; https://github.com/connorlay/tree-sitter-heex/blob/592e22292a367312c35e13de7fdb888f029981d6/queries/highlights.scm
2 ; HEEx delimiters
3 [
4 "<!"
5 "<"
6 "<%#"
7 ">"
8 "</"
9 "/>"
10 ; These could be `@keyword`s but the closing `>` wouldn't be highlighted
11 ; as `@keyword`
12 "<:"
13 "</:"
14 ] @punctuation.bracket
15
16 ; Non-comment or tag delimiters
17 [
18 "{"
19 "}"
20 "<%"
21 "<%="
22 "<%%="
23 "%>"
24 ] @keyword
25
26 ; HEEx operators are highlighted as such
27 "=" @operator
28
29 ; HEEx inherits the DOCTYPE tag from HTML
30 (doctype) @constant
31
32 ; HEEx comments are highlighted as such
33 [
34 "<!--"
35 "-->"
36 "<%!--"
37 "--%>"
38 (comment)
39 ] @comment
40
41 ; HEEx tags are highlighted as HTML
42 (tag_name) @tag
43
44 ; HEEx slots are highlighted as atoms (symbols)
45 (slot_name) @string.special.symbol
46
47 ; HEEx attributes are highlighted as HTML attributes
48 (attribute_name) @attribute
49 [
50 (attribute_value)
51 (quoted_attribute_value)
52 ] @string
53
54 ; HEEx special attributes are keywords
55 (special_attribute_name) @keyword
56
57 ; HEEx components are highlighted as Elixir modules and functions
58 (component_name
59 [
60 (module) @namespace
61 (function) @function
62 "." @punctuation.delimiter
63 ])