Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'runtime/queries/go/locals.scm')
-rw-r--r--runtime/queries/go/locals.scm10
1 files changed, 4 insertions, 6 deletions
diff --git a/runtime/queries/go/locals.scm b/runtime/queries/go/locals.scm
index 305c25cd..070667ca 100644
--- a/runtime/queries/go/locals.scm
+++ b/runtime/queries/go/locals.scm
@@ -8,10 +8,6 @@
; Definitions
-(type_parameter_list
- (parameter_declaration
- name: (identifier) @local.definition.variable.parameter))
-
(parameter_declaration (identifier) @local.definition.variable.parameter)
(variadic_parameter_declaration (identifier) @local.definition.variable.parameter)
@@ -22,5 +18,7 @@
; References
(identifier) @local.reference
-(field_identifier) @local.reference
-(type_identifier) @local.reference
+
+; Field names in struct literals are identifier rather than field_identifier,
+; these cannot be locals.
+(keyed_element . (literal_element (identifier) @variable.other.member))