mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-05 04:50:03 -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
|
|
@ -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