diff --git a/runtime/queries/templ/highlights.scm b/runtime/queries/templ/highlights.scm index 11dace4705dae..193d988c6def1 100644 --- a/runtime/queries/templ/highlights.scm +++ b/runtime/queries/templ/highlights.scm @@ -6,11 +6,11 @@ (package_identifier) @namespace -(parameter_declaration (identifier) @parameter) -(variadic_parameter_declaration (identifier) @parameter) +(parameter_declaration (identifier) @variable.parameter) +(variadic_parameter_declaration (identifier) @variable.parameter) (function_declaration - name: (identifier) @function) + name: (identifier) @definition.function) (type_spec name: (type_identifier) @type.definition) (type_identifier) @type @@ -20,11 +20,11 @@ ; Function calls (call_expression - function: (identifier) @function.call) + function: (identifier) @reference.call) (call_expression function: (selector_expression - field: (field_identifier) @method.call)) + field: (field_identifier) @reference.call)) ; ; These are Templ specific @@ -39,7 +39,7 @@ (style_element) @tag (attribute - name: (attribute_name) @tag.attribute) + name: (attribute_name) @attribute) (attribute value: (quoted_attribute_value) @string) @@ -55,7 +55,7 @@ (component_import name: (component_identifier) @function) -(component_render) @function.call +(component_render) @function [ "@" @@ -72,12 +72,12 @@ "struct" "range" "script" -] @keyword +] @keyword.storate.type [ "import" "package" -] @include +] @keyword.control.import [ "else" @@ -85,9 +85,9 @@ "switch" "if" "default" -] @conditional +] @keyword.control.conditional -"for" @repeat +"for" @keyword.control.repeat [ (interpreted_string_literal)