summaryrefslogtreecommitdiff
path: root/runtime/queries/go/highlights.scm
diff options
context:
space:
mode:
authorJoey Hain2023-11-06 01:54:25 +0000
committerGitHub2023-11-06 01:54:25 +0000
commitf73e9a8d15fd5a87d472a49808baf42ba403f9bf (patch)
treec57d8b378ef5877a5f2894b2dc6845b28bffdbbf /runtime/queries/go/highlights.scm
parenta98ad137f9b0678ce9770aaa56a8bf8ca7c51d17 (diff)
highlights: add type.parameter scope to several more languages (#8718)
* typescript * go * haskell * ocaml * kotlin (+ bugfix)
Diffstat (limited to 'runtime/queries/go/highlights.scm')
-rw-r--r--runtime/queries/go/highlights.scm16
1 files changed, 12 insertions, 4 deletions
diff --git a/runtime/queries/go/highlights.scm b/runtime/queries/go/highlights.scm
index b45a11be..fba2df99 100644
--- a/runtime/queries/go/highlights.scm
+++ b/runtime/queries/go/highlights.scm
@@ -11,6 +11,18 @@
function: (selector_expression
field: (field_identifier) @function.method))
+
+; Types
+
+(type_parameter_list
+ (parameter_declaration
+ name: (identifier) @type.parameter))
+
+((type_identifier) @type.builtin
+ (match? @type.builtin "^(any|bool|byte|comparable|complex128|complex64|error|float32|float64|int|int16|int32|int64|int8|rune|string|uint|uint16|uint32|uint64|uint8|uintptr)$"))
+
+(type_identifier) @type
+
; Function definitions
(function_declaration
@@ -30,10 +42,6 @@
(parameter_declaration (identifier) @variable.parameter)
(variadic_parameter_declaration (identifier) @variable.parameter)
-((type_identifier) @type.builtin
- (match? @type.builtin "^(any|bool|byte|comparable|complex128|complex64|error|float32|float64|int|int16|int32|int64|int8|rune|string|uint|uint16|uint32|uint64|uint8|uintptr)$"))
-
-(type_identifier) @type
(type_spec
name: (type_identifier) @constructor)
(field_identifier) @variable.other.member