(
  (class_declaration (identifier) @name) @definition.class
)

(
  (struct_declaration (identifier) @name) @definition.struct
)

(
  (method_declaration (identifier) @name) @definition.method
)

(
  (interface_declaration (identifier) @name) @definition.interface
)

(
  (local_function_statement (identifier) @name) @definition.function
)