Skip to content

Commit

Permalink
fix captures
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Oct 15, 2023
1 parent 979d3e2 commit 124d543
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions runtime/queries/templ/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -39,7 +39,7 @@
(style_element) @tag

(attribute
name: (attribute_name) @tag.attribute)
name: (attribute_name) @attribute)
(attribute
value: (quoted_attribute_value) @string)

Expand All @@ -55,7 +55,7 @@
(component_import
name: (component_identifier) @function)

(component_render) @function.call
(component_render) @function

[
"@"
Expand All @@ -72,22 +72,22 @@
"struct"
"range"
"script"
] @keyword
] @keyword.storate.type

[
"import"
"package"
] @include
] @keyword.control.import

[
"else"
"case"
"switch"
"if"
"default"
] @conditional
] @keyword.control.conditional

"for" @repeat
"for" @keyword.control.repeat

[
(interpreted_string_literal)
Expand Down

0 comments on commit 124d543

Please sign in to comment.