; Go highlights, from tree-sitter/tree-sitter-go v0.25.0 queries/highlights.scm ; (MIT). Reordered — upstream is written first-pattern-wins, this engine paints ; later patterns over earlier ones — capture names mapped onto zed syntax keys, ; and the builtin-function #match? turned into #any-of?, which needs no regex. ["(" ")" "[" "]" "{" "}"] @punctuation.bracket [";" "," "." ":"] @punctuation.delimiter ["--" "-" "-=" ":=" "!" "!=" "..." "*" "*=" "/" "/=" "&" "&&" "&=" "%" "%=" "^" "^=" "+" "++" "+=" "<-" "<" "<<" "<<=" "<=" "=" "==" ">" ">=" ">>" ">>=" "|" "|=" "||" "~"] @operator ["break" "case" "chan" "const" "continue" "default" "defer" "else" "fallthrough" "for" "func" "go" "goto" "if" "import" "interface" "map" "package" "range" "return" "select" "struct" "switch" "type" "var"] @keyword (type_identifier) @type (field_identifier) @property (label_name) @label (function_declaration name: (identifier) @function) (method_declaration name: (field_identifier) @function.method) (call_expression function: (identifier) @function) (call_expression function: (selector_expression field: (field_identifier) @function.method)) ((call_expression function: (identifier) @function.builtin) (#any-of? @function.builtin "append" "cap" "clear" "close" "complex" "copy" "delete" "imag" "len" "make" "max" "min" "new" "panic" "print" "println" "real" "recover")) [(int_literal) (float_literal) (imaginary_literal)] @number [(true) (false) (nil) (iota)] @constant [(interpreted_string_literal) (raw_string_literal) (rune_literal)] @string (escape_sequence) @string.escape (comment) @comment