
Closes #33951 There's an adjustment that kicks in to extend `name_ranges` when we capture more than one `@name` for an outline `@item`. That was happening here because we captured both the parameter name for the method receiver and the name of the method as `@name`. It seems like only the second one should have that annotation. Release Notes: - Fixed extraneous leading space in `$ZED_SYMBOL` when used with Go methods.
64 lines
1.2 KiB
Scheme
64 lines
1.2 KiB
Scheme
(comment) @annotation
|
|
(type_declaration
|
|
"type" @context
|
|
[
|
|
(type_spec
|
|
name: (_) @name) @item
|
|
(
|
|
"("
|
|
(type_spec
|
|
name: (_) @name) @item
|
|
")"
|
|
)
|
|
]
|
|
)
|
|
|
|
(function_declaration
|
|
"func" @context
|
|
name: (identifier) @name
|
|
parameters: (parameter_list
|
|
"("
|
|
")")) @item
|
|
|
|
(method_declaration
|
|
"func" @context
|
|
receiver: (parameter_list
|
|
"(" @context
|
|
(parameter_declaration
|
|
name: (_) @context
|
|
type: (_) @context)
|
|
")" @context)
|
|
name: (field_identifier) @name
|
|
parameters: (parameter_list
|
|
"("
|
|
")")) @item
|
|
|
|
(const_declaration
|
|
"const" @context
|
|
(const_spec
|
|
name: (identifier) @name) @item)
|
|
|
|
(source_file
|
|
(var_declaration
|
|
"var" @context
|
|
[
|
|
(var_spec
|
|
name: (identifier) @name) @item
|
|
(var_spec_list
|
|
"("
|
|
(var_spec
|
|
name: (identifier) @name) @item
|
|
")"
|
|
)
|
|
]
|
|
)
|
|
)
|
|
|
|
(method_elem
|
|
name: (_) @name
|
|
parameters: (parameter_list
|
|
"(" @context
|
|
")" @context)) @item
|
|
|
|
(field_declaration
|
|
name: (_) @name) @item
|