nvim-treesitter/queries/teal/locals.scm

24 lines
580 B
Scheme
Raw Normal View History

2020-10-04 19:39:12 -05:00
(var_declaration
2021-07-25 15:27:51 +02:00
declarators: (var_declarators
(var (identifier)) @definition.var))
2020-10-04 19:39:12 -05:00
(var_assignment
2021-07-25 15:27:51 +02:00
variables: (assignment_variables
(var (identifier) @definition.var) @definition.associated))
2020-10-04 19:39:12 -05:00
2020-12-16 16:42:33 -06:00
(arg name: (identifier) @definition.parameter)
2020-10-04 19:39:12 -05:00
2020-12-16 16:42:33 -06:00
(anon_function) @scope
2020-10-04 20:13:32 -05:00
((function_statement
2021-07-25 15:27:51 +02:00
(function_name) @definition.function) @scope)
2020-10-04 19:39:12 -05:00
(program) @scope
(if_statement) @scope
2021-07-25 15:27:51 +02:00
(generic_for_statement (for_body) @scope)
(numeric_for_statement (for_body) @scope)
2020-10-04 19:39:12 -05:00
(repeat_statement) @scope
(while_statement (while_body) @scope)
(do_statement) @scope
(identifier) @reference