mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 19:30:02 -04:00
feat!: drop modules, general refactor and cleanup
This commit is contained in:
parent
310f0925ec
commit
692b051b09
1247 changed files with 6096 additions and 9074 deletions
42
runtime/queries/ecma/locals.scm
Normal file
42
runtime/queries/ecma/locals.scm
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
; Scopes
|
||||
;-------
|
||||
(statement_block) @local.scope
|
||||
|
||||
(function_expression) @local.scope
|
||||
|
||||
(arrow_function) @local.scope
|
||||
|
||||
(function_declaration) @local.scope
|
||||
|
||||
(method_definition) @local.scope
|
||||
|
||||
(for_statement) @local.scope
|
||||
|
||||
(for_in_statement) @local.scope
|
||||
|
||||
(catch_clause) @local.scope
|
||||
|
||||
; Definitions
|
||||
;------------
|
||||
(variable_declarator
|
||||
name: (identifier) @local.definition.var)
|
||||
|
||||
(import_specifier
|
||||
(identifier) @local.definition.import)
|
||||
|
||||
(namespace_import
|
||||
(identifier) @local.definition.import)
|
||||
|
||||
(function_declaration
|
||||
(identifier) @local.definition.function
|
||||
(#set! definition.var.scope parent))
|
||||
|
||||
(method_definition
|
||||
(property_identifier) @local.definition.function
|
||||
(#set! definition.var.scope parent))
|
||||
|
||||
; References
|
||||
;------------
|
||||
(identifier) @local.reference
|
||||
|
||||
(shorthand_property_identifier) @local.reference
|
||||
Loading…
Add table
Add a link
Reference in a new issue