; Waltzing Template Highlights
; Comments
(html_comment) @comment
(template_comment) @comment
; Raw blocks (verbatim content)
(raw_block) @string.special
; Embedded language
(embedded_language) @string.special
(language_name) @label
; Keywords
"@use" @keyword
"@import" @keyword
"@struct" @keyword
"@enum" @keyword
"@fn" @keyword
"@let" @keyword
"@if" @keyword
"@for" @keyword
"@match" @keyword
"@break" @keyword
"@continue" @keyword
"else" @keyword
"if" @keyword
"let" @keyword
"in" @keyword
"as" @keyword
"mut" @keyword
"safe" @keyword
; Types
(primitive_type) @type
(struct_definition (identifier) @type)
(enum_definition (identifier) @type)
(generic_params (identifier) @type)
(generic_type (rust_path) @type)
; Functions
(function_definition (identifier) @function)
(function_path) @function
(method_call (identifier) @function)
; Parameters
(parameter (identifier) @variable)
; Properties
(struct_field (identifier) @property)
(field_access (identifier) @property)
(field_pattern (identifier) @property)
; Constructors
(enum_variant (identifier) @constructor)
; Strings
(string_literal) @string
(char_literal) @string
(attribute_value) @string
; Numbers
(integer_literal) @number
(float_literal) @number
; Booleans
(boolean_literal) @boolean
; Operators
(binary_operator) @operator
(unary_operator) @operator
"=>" @operator
"=" @operator
; Punctuation
"{" @punctuation.bracket
"}" @punctuation.bracket
"(" @punctuation.bracket
")" @punctuation.bracket
"[" @punctuation.bracket
"]" @punctuation.bracket
"," @punctuation.delimiter
":" @punctuation.delimiter
";" @punctuation.delimiter
; Tags
(tag_name) @tag
"<@" @tag
"@" @tag
; Attributes
(attribute_name) @attribute
(attribute_list) @attribute
(attribute (identifier) @attribute)
; Module paths
(use_statement (rust_path) @type)
(rust_path) @variable
; Escape
(escape_sequence) @escape
(escape_at) @escape
; Variables (fallback)
(identifier) @variable