Debian Codegraph @

runtime/queries/templ/highlights.scm

raw symbols SCIP
1 ; inherits: go
2
3 (css_declaration
4 name: (css_identifier) @function)
5 (script_declaration
6 name: (script_identifier) @function)
7 (component_declaration
8 name: (component_identifier) @function)
9
10 ; Elements
11
12 (tag_start name: (_) @tag)
13 (tag_end name: (_) @tag)
14 (self_closing_tag name: (_) @tag)
15
16 (tag_start ["<" ">"] @punctuation.bracket)
17 (tag_end ["</" ">"] @punctuation.bracket)
18 (self_closing_tag ["<" "/>"] @punctuation.bracket)
19
20 (style_tag_start "style" @tag)
21 (style_tag_end "style" @tag)
22 (self_closing_style_tag "style" @tag)
23
24 (style_tag_start ["<" ">"] @punctuation.bracket)
25 (style_tag_end ["</" ">"] @punctuation.bracket)
26 (self_closing_style_tag ["<" "/>"] @punctuation.bracket)
27
28 (script_tag_start "script" @tag)
29 (script_tag_end "script" @tag)
30 (self_closing_script_tag "script" @tag)
31
32 (script_tag_start ["<" ">"] @punctuation.bracket)
33 (script_tag_end ["</" ">"] @punctuation.bracket)
34 (self_closing_script_tag ["<" "/>"] @punctuation.bracket)
35
36 ; Attributes
37
38 (attribute
39 name: (attribute_name) @attribute)
40 (attribute
41 value: (quoted_attribute_value) @string)
42
43 (css_property
44 name: (css_property_name) @variable.other.member)
45 (css_property
46 value: (css_property_value) @constant)
47
48 (dynamic_class_attribute_value) @function.method
49
50 ; Special Elements and Attributes
51
52 ((attribute
53 name: (attribute_name) @attribute
54 value: (quoted_attribute_value (attribute_value) @markup.link.url))
55 (#any-of? @attribute "href" "src"))
56
57 ((element
58 (tag_start
59 name: (_) @tag)
60 (element_text) @markup.link.label)
61 (#eq? @tag "a"))
62
63 ((element
64 (tag_start
65 name: (_) @tag)
66 (element_text) @markup.bold)
67 (#any-of? @tag "strong" "b"))
68
69 ((element
70 (tag_start
71 name: (_) @tag)
72 (element_text) @markup.italic)
73 (#any-of? @tag "em" "i"))
74
75 ((element
76 (tag_start
77 name: (_) @tag)
78 (element_text) @markup.strikethrough)
79 (#any-of? @tag "s" "del"))
80
81 ; Extra Features
82
83 (component_import
84 name: (component_identifier) @function)
85
86 (component_render) @function
87
88 "@" @operator
89
90 [
91 "templ"
92 "css"
93 "type"
94 ] @keyword.storage.type
95 (script_declaration "script" @keyword.storage.type)
96
97 ["{{" "}}"] @punctuation.bracket
98
99 ; Comments
100
101 (element_comment) @comment