08b442f4cc
JavaScript queries now contain a few lines that prevent them from being used whole-sale in typescript with `; inherits: javascript`. Here we follow nvim-treesitter's way of using a fake 'ecma' language as a common base for JavaScript and TypeScript to share as much as we can.
29 lines
447 B
Scheme
29 lines
447 B
Scheme
; Scopes
|
|
;-------
|
|
|
|
[
|
|
(statement_block)
|
|
(function)
|
|
(arrow_function)
|
|
(function_declaration)
|
|
(method_definition)
|
|
] @local.scope
|
|
|
|
; Definitions
|
|
;------------
|
|
|
|
(pattern/identifier) @local.definition
|
|
|
|
(pattern/rest_pattern
|
|
(identifier) @local.definition)
|
|
|
|
(arrow_function
|
|
parameter: (identifier) @local.definition)
|
|
|
|
(variable_declarator
|
|
name: (identifier) @local.definition)
|
|
|
|
; References
|
|
;------------
|
|
|
|
(identifier) @local.reference
|