mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 03:26:52 -04:00
feat(locals)!: switch to upstream captures
This commit is contained in:
parent
306367a7f4
commit
8fb218dbfd
95 changed files with 1154 additions and 1154 deletions
|
|
@ -9,43 +9,43 @@
|
|||
(for_statement)
|
||||
(function_declaration)
|
||||
(function_definition)
|
||||
] @scope
|
||||
] @local.scope
|
||||
|
||||
; Definitions
|
||||
|
||||
(assignment_statement
|
||||
(variable_list
|
||||
(identifier) @definition.var))
|
||||
(identifier) @local.definition.var))
|
||||
|
||||
(assignment_statement
|
||||
(variable_list
|
||||
(dot_index_expression . (_) @definition.associated (identifier) @definition.var)))
|
||||
(dot_index_expression . (_) @local.definition.associated (identifier) @local.definition.var)))
|
||||
|
||||
((function_declaration
|
||||
name: (identifier) @definition.function)
|
||||
name: (identifier) @local.definition.function)
|
||||
(#set! definition.function.scope "parent"))
|
||||
|
||||
((function_declaration
|
||||
name: (dot_index_expression
|
||||
. (_) @definition.associated (identifier) @definition.function))
|
||||
. (_) @local.definition.associated (identifier) @local.definition.function))
|
||||
(#set! definition.method.scope "parent"))
|
||||
|
||||
((function_declaration
|
||||
name: (method_index_expression
|
||||
. (_) @definition.associated (identifier) @definition.method))
|
||||
. (_) @local.definition.associated (identifier) @local.definition.method))
|
||||
(#set! definition.method.scope "parent"))
|
||||
|
||||
(for_generic_clause
|
||||
(variable_list
|
||||
(identifier) @definition.var))
|
||||
(identifier) @local.definition.var))
|
||||
|
||||
(for_numeric_clause
|
||||
name: (identifier) @definition.var)
|
||||
name: (identifier) @local.definition.var)
|
||||
|
||||
(parameters (identifier) @definition.parameter)
|
||||
(parameters (identifier) @local.definition.parameter)
|
||||
|
||||
; References
|
||||
|
||||
[
|
||||
(identifier)
|
||||
] @reference
|
||||
] @local.reference
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue