mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-16 18:30:06 -04:00
feat(locals)!: switch to upstream captures
This commit is contained in:
parent
f197a15b0d
commit
5b90ea2aba
109 changed files with 1341 additions and 1341 deletions
|
|
@ -22,7 +22,7 @@
|
|||
(foreach_statement)
|
||||
(try_statement)
|
||||
(catch_statement)
|
||||
] @scope
|
||||
] @local.scope
|
||||
|
||||
|
||||
; References
|
||||
|
|
@ -30,38 +30,38 @@
|
|||
[
|
||||
(identifier)
|
||||
(global_variable)
|
||||
] @reference
|
||||
] @local.reference
|
||||
|
||||
; Definitions
|
||||
|
||||
(const_declaration
|
||||
. (identifier) @definition.constant)
|
||||
. (identifier) @local.definition.constant)
|
||||
|
||||
(enum_declaration
|
||||
. (identifier) @definition.enum)
|
||||
. (identifier) @local.definition.enum)
|
||||
|
||||
(member_declaration
|
||||
(identifier) @definition.field
|
||||
(identifier) @local.definition.field
|
||||
. "=")
|
||||
|
||||
(table_slot
|
||||
. (identifier) @definition.field
|
||||
. (identifier) @local.definition.field
|
||||
. ["=" ":"])
|
||||
|
||||
((function_declaration
|
||||
. (identifier) @definition.function)
|
||||
(#not-has-ancestor? @definition.function member_declaration))
|
||||
. (identifier) @local.definition.function)
|
||||
(#not-has-ancestor? @local.definition.function member_declaration))
|
||||
|
||||
(member_declaration
|
||||
(function_declaration
|
||||
. (identifier) @definition.method))
|
||||
. (identifier) @local.definition.method))
|
||||
|
||||
(class_declaration
|
||||
. (identifier) @definition.type)
|
||||
. (identifier) @local.definition.type)
|
||||
|
||||
(var_statement
|
||||
"var" . (identifier) @definition.variable)
|
||||
"var" . (identifier) @local.definition.variable)
|
||||
|
||||
(local_declaration
|
||||
(identifier) @definition.variable
|
||||
(identifier) @local.definition.variable
|
||||
. "=")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue