mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-24 06:20:05 +08:00
52 lines
1.0 KiB
Scheme
52 lines
1.0 KiB
Scheme
; Scopes
|
|
|
|
[
|
|
(chunk)
|
|
(do_statement)
|
|
(while_statement)
|
|
(repeat_statement)
|
|
(if_statement)
|
|
(for_statement)
|
|
(function_declaration)
|
|
(function_definition)
|
|
] @scope
|
|
|
|
; References
|
|
|
|
[
|
|
(identifier)
|
|
] @reference
|
|
|
|
; Definitions
|
|
|
|
(assignment_statement
|
|
(variable_list
|
|
(identifier) @definition.var))
|
|
|
|
(assignment_statement
|
|
(variable_list
|
|
(dot_index_expression . (_) @definition.associated (identifier) @definition.var)))
|
|
|
|
((function_declaration
|
|
name: (identifier) @definition.function)
|
|
(#set! definition.function.scope "parent"))
|
|
|
|
((function_declaration
|
|
name: (dot_index_expression
|
|
. (_) @definition.associated (identifier) @definition.function))
|
|
(#set! definition.method.scope "parent"))
|
|
|
|
((function_declaration
|
|
name: (method_index_expression
|
|
. (_) @definition.associated (identifier) @definition.method))
|
|
(#set! definition.method.scope "parent"))
|
|
|
|
(for_generic_clause
|
|
(variable_list
|
|
(identifier) @definition.var))
|
|
|
|
(for_numeric_clause
|
|
name: (identifier) @definition.var)
|
|
|
|
(parameter (identifier) @definition.parameter)
|