mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-30 22:34:13 +00:00
Tweak golang outline query
This commit is contained in:
parent
9495717421
commit
924e9648e9
1 changed files with 23 additions and 5 deletions
|
@ -5,22 +5,40 @@
|
|||
|
||||
(function_declaration
|
||||
"func" @context
|
||||
name: (identifier) @name) @item
|
||||
name: (identifier) @name
|
||||
parameters: (parameter_list
|
||||
"(" @context
|
||||
")" @context)) @item
|
||||
|
||||
(method_declaration
|
||||
"func" @context
|
||||
receiver: (parameter_list
|
||||
"(" @context
|
||||
(parameter_declaration
|
||||
type: (_) @context))
|
||||
name: (field_identifier) @name) @item
|
||||
type: (_) @context)
|
||||
")" @context)
|
||||
name: (field_identifier) @name
|
||||
parameters: (parameter_list
|
||||
"(" @context
|
||||
")" @context)) @item
|
||||
|
||||
(const_declaration
|
||||
"const" @context
|
||||
(const_spec
|
||||
name: (identifier) @name)) @item
|
||||
name: (identifier) @name) @item)
|
||||
|
||||
(source_file
|
||||
(var_declaration
|
||||
"var" @context
|
||||
(var_spec
|
||||
name: (identifier) @name)) @item)
|
||||
name: (identifier) @name) @item))
|
||||
|
||||
(method_spec
|
||||
name: (_) @name
|
||||
parameters: (parameter_list
|
||||
"(" @context
|
||||
")" @context)) @item
|
||||
|
||||
(field_declaration
|
||||
name: (_) @name
|
||||
type: (_) @context) @item
|
Loading…
Reference in a new issue