init.lua/queries/gotmpl/highlights.scm(view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
; Identifiers
[(field) (field_identifier)] @property
(variable) @variable
; Function calls
(function_call
function: (identifier) @function)
(method_call
method: (selector_expression
field: (field_identifier) @method))
; Operators
"|" @operator
":=" @operator
; Builtin functions
((identifier) @function.builtin
(#match? @function.builtin "^(and|call|html|index|slice|js|len|not|or|print|printf|println|urlquery|eq|ne|lt|ge|gt|ge)$"))
; Delimiters
"." @punctuation.delimiter
"," @punctuation.delimiter
"{{" @punctuation.bracket
"}}" @punctuation.bracket
"{{-" @punctuation.bracket
"-}}" @punctuation.bracket
")" @punctuation.bracket
"(" @punctuation.bracket
; Keywords
["else" "else if" "if" "with"] @conditional
["range" "end" "template" "define" "block"] @keyword
; Literals
[(interpreted_string_literal)
(raw_string_literal)
(rune_literal)] @string
[(int_literal)
(float_literal)
(imaginary_literal)] @number
[(true) (false)] @boolean
[(nil)] @constant.builtin
(escape_sequence) @string.special
(comment) @comment
(ERROR) @error
|