Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'runtime/queries/go/highlights.scm')
| -rw-r--r-- | runtime/queries/go/highlights.scm | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/runtime/queries/go/highlights.scm b/runtime/queries/go/highlights.scm index be9efeac..485b5cb8 100644 --- a/runtime/queries/go/highlights.scm +++ b/runtime/queries/go/highlights.scm @@ -10,7 +10,7 @@ (const_spec name: (identifier) @constant) -(type_spec +(type_spec name: (type_identifier) @constructor) (keyed_element . (literal_element (identifier) @variable.other.member)) @@ -36,14 +36,14 @@ (call_expression function: (identifier) @function.builtin - (#match? @function.builtin "^(append|cap|close|complex|copy|delete|imag|len|make|new|panic|print|println|real|recover|min|max|clear)$")) + (#match? @function.builtin "^(append|cap|close|complex|copy|delete|imag|len|make|new|panic|print|println|real|recover)$")) ; Types (type_identifier) @type (type_parameter_list - (type_parameter_declaration + (parameter_declaration name: (identifier) @type.parameter)) ((type_identifier) @type.builtin @@ -57,8 +57,9 @@ (method_declaration name: (field_identifier) @function.method) -(method_elem - name: (field_identifier) @function.method) +(method_spec + name: (field_identifier) @function.method) + ; Operators @@ -99,8 +100,6 @@ "|" "|=" "||" - "&^" - "&^=" "~" ] @operator @@ -118,7 +117,7 @@ ] @keyword.control [ - "if" + "if" "else" "switch" "select" @@ -181,10 +180,9 @@ [ (interpreted_string_literal) (raw_string_literal) + (rune_literal) ] @string -(rune_literal) @constant.character - (escape_sequence) @constant.character.escape [ |