mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-06 12:45:00 +00:00
refactor: Update go-tags.scm to use more specific @name tags
This commit is contained in:
parent
d5cc855c0f
commit
89406e5b7d
1 changed files with 14 additions and 14 deletions
|
@ -2,7 +2,7 @@
|
||||||
(comment)* @doc
|
(comment)* @doc
|
||||||
.
|
.
|
||||||
(function_declaration
|
(function_declaration
|
||||||
name: (identifier) @name) @definition.function
|
name: (identifier) @name.definition.function) @definition.function
|
||||||
(#strip! @doc "^//\\s*")
|
(#strip! @doc "^//\\s*")
|
||||||
(#set-adjacent! @doc @definition.function)
|
(#set-adjacent! @doc @definition.function)
|
||||||
)
|
)
|
||||||
|
@ -11,32 +11,32 @@
|
||||||
(comment)* @doc
|
(comment)* @doc
|
||||||
.
|
.
|
||||||
(method_declaration
|
(method_declaration
|
||||||
name: (field_identifier) @name) @definition.method
|
name: (field_identifier) @name.definition.method) @definition.method
|
||||||
(#strip! @doc "^//\\s*")
|
(#strip! @doc "^//\\s*")
|
||||||
(#set-adjacent! @doc @definition.method)
|
(#set-adjacent! @doc @definition.method)
|
||||||
)
|
)
|
||||||
|
|
||||||
(call_expression
|
(call_expression
|
||||||
function: [
|
function: [
|
||||||
(identifier) @name
|
(identifier) @name.reference.call
|
||||||
(parenthesized_expression (identifier) @name)
|
(parenthesized_expression (identifier) @name.reference.call)
|
||||||
(selector_expression field: (field_identifier) @name)
|
(selector_expression field: (field_identifier) @name.reference.call)
|
||||||
(parenthesized_expression (selector_expression field: (field_identifier) @name))
|
(parenthesized_expression (selector_expression field: (field_identifier) @name.reference.call))
|
||||||
]) @reference.call
|
]) @reference.call
|
||||||
|
|
||||||
(type_spec
|
(type_spec
|
||||||
name: (type_identifier) @name) @definition.type
|
name: (type_identifier) @name.definition.type) @definition.type
|
||||||
|
|
||||||
(type_identifier) @name @reference.type
|
(type_identifier) @name.reference.type @reference.type
|
||||||
|
|
||||||
(package_clause "package" (package_identifier) @name)
|
(package_clause "package" (package_identifier) @name.definition.module)
|
||||||
|
|
||||||
(type_declaration (type_spec name: (type_identifier) @name type: (interface_type)))
|
(type_declaration (type_spec name: (type_identifier) @name.definition.interface type: (interface_type)))
|
||||||
|
|
||||||
(type_declaration (type_spec name: (type_identifier) @name type: (struct_type)))
|
(type_declaration (type_spec name: (type_identifier) @name.definition.class type: (struct_type)))
|
||||||
|
|
||||||
(import_declaration (import_spec) @name)
|
(import_declaration (import_spec) @name.reference.module)
|
||||||
|
|
||||||
(var_declaration (var_spec name: (identifier) @name))
|
(var_declaration (var_spec name: (identifier) @name.definition.variable))
|
||||||
|
|
||||||
(const_declaration (const_spec name: (identifier) @name))
|
(const_declaration (const_spec name: (identifier) @name.definition.constant))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue