; Scopes
(function_declaration) @scope
(block_expression) @scope
(lambda_expression) @scope
(match_arm) @scope
(handler_declaration) @scope

; Definitions
(function_declaration name: (identifier) @definition.function)
(let_declaration name: (identifier) @definition.var)
(parameter name: (identifier) @definition.parameter)
(type_declaration name: (identifier) @definition.type)
(effect_declaration name: (identifier) @definition.type)
(trait_declaration name: (identifier) @definition.type)
(handler_declaration name: (identifier) @definition.function)

; Pattern bindings
(pattern (identifier) @definition.var)

; References
(identifier) @reference
