helix/runtime/queries/ruby/locals.scm
2025-03-27 10:50:04 -04:00

20 lines
790 B
Scheme

((method) @local.scope
(#set! local.scope-inherits false))
[
(lambda)
(block)
(do_block)
] @local.scope
(block_parameter (identifier) @local.definition.variable.parameter)
(block_parameters (identifier) @local.definition.variable.parameter)
(destructured_parameter (identifier) @local.definition.variable.parameter)
(hash_splat_parameter (identifier) @local.definition.variable.parameter)
(lambda_parameters (identifier) @local.definition.variable.parameter)
(method_parameters (identifier) @local.definition.variable.parameter)
(splat_parameter (identifier) @local.definition.variable.parameter)
(keyword_parameter name: (identifier) @local.definition.variable.parameter)
(optional_parameter name: (identifier) @local.definition.variable.parameter)
(identifier) @local.reference