aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/queries/templ/highlights.scm
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/queries/templ/highlights.scm')
-rw-r--r--runtime/queries/templ/highlights.scm60
1 files changed, 60 insertions, 0 deletions
diff --git a/runtime/queries/templ/highlights.scm b/runtime/queries/templ/highlights.scm
new file mode 100644
index 000000000..034c91d5b
--- /dev/null
+++ b/runtime/queries/templ/highlights.scm
@@ -0,0 +1,60 @@
+; inherits: go
+
+(component_declaration
+ name: (component_identifier) @function)
+
+[
+ (tag_start)
+ (tag_end)
+ (self_closing_tag)
+ (style_element)
+] @tag
+
+(doctype) @constant
+
+(attribute
+ name: (attribute_name) @tag.attribute)
+
+(attribute
+ value: (quoted_attribute_value) @string)
+
+[
+ (element_text)
+ (style_element_text)
+] @string.special
+
+(css_identifier) @function
+
+(css_property
+ name: (css_property_name) @property)
+
+(css_property
+ value: (css_property_value) @string)
+
+[
+ (expression)
+ (dynamic_class_attribute_value)
+] @function.method
+
+(component_import
+ name: (component_identifier) @function)
+
+(component_render) @function.call
+
+(element_comment) @comment @spell
+
+[
+ "<"
+ ">"
+ "</"
+ "/>"
+ "<!"
+] @tag.delimiter
+
+"@" @operator
+
+[
+ "templ"
+ "css"
+ "script"
+] @keyword