refactor: Update gleam-tags.scm to use more specific @name tags

This commit is contained in:
Paul Gauthier (aider) 2025-03-12 14:22:16 -07:00
parent 2ed61eaf92
commit d5cc855c0f

View file

@ -1,41 +1,41 @@
; Modules ; Modules
(module) @name @reference.module (module) @name.reference.module @reference.module
(import alias: (identifier) @name) @reference.module (import alias: (identifier) @name.reference.module) @reference.module
(remote_type_identifier (remote_type_identifier
module: (identifier) @name) @reference.module module: (identifier) @name.reference.module) @reference.module
((field_access ((field_access
record: (identifier) @name) record: (identifier) @name.reference.module)
(#is-not? local)) @reference.module (#is-not? local)) @reference.module
; Functions ; Functions
(function (function
name: (identifier) @name) @definition.function name: (identifier) @name.definition.function) @definition.function
(external_function (external_function
name: (identifier) @name) @definition.function name: (identifier) @name.definition.function) @definition.function
(unqualified_import (identifier) @name) @reference.function (unqualified_import (identifier) @name.reference.function) @reference.function
((function_call ((function_call
function: (identifier) @name) @reference.function function: (identifier) @name.reference.function) @reference.function
(#is-not? local)) (#is-not? local))
((field_access ((field_access
record: (identifier) @ignore record: (identifier) @ignore
field: (label) @name) field: (label) @name.reference.function)
(#is-not? local)) @reference.function (#is-not? local)) @reference.function
((binary_expression ((binary_expression
operator: "|>" operator: "|>"
right: (identifier) @name) right: (identifier) @name.reference.function)
(#is-not? local)) @reference.function (#is-not? local)) @reference.function
; Types ; Types
(type_definition (type_definition
(type_name (type_name
name: (type_identifier) @name)) @definition.type name: (type_identifier) @name.definition.type)) @definition.type
(type_definition (type_definition
(data_constructors (data_constructors
(data_constructor (data_constructor
name: (constructor_name) @name))) @definition.constructor name: (constructor_name) @name.definition.constructor))) @definition.constructor
(external_type (external_type
(type_name (type_name
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
(constructor_name) @name @reference.constructor (constructor_name) @name.reference.constructor @reference.constructor