diff options
Diffstat (limited to 'runtime/queries/_typescript/locals.scm')
-rw-r--r-- | runtime/queries/_typescript/locals.scm | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/runtime/queries/_typescript/locals.scm b/runtime/queries/_typescript/locals.scm index fe13f21d..041ad59d 100644 --- a/runtime/queries/_typescript/locals.scm +++ b/runtime/queries/_typescript/locals.scm @@ -1,6 +1,18 @@ +; Scopes +;------- + +[ + (type_alias_declaration) + (class_declaration) + (interface_declaration) +] @local.scope + ; Definitions ;------------ +(type_parameter + name: (type_identifier) @local.definition) + ; Javascript and Typescript Treesitter grammars deviate when defining the ; tree structure for parameters, so we need to address them in each specific ; language instead of ecma. @@ -14,3 +26,8 @@ ; (i?: t = 1) // Invalid but still posible to hihglight. (optional_parameter (identifier) @local.definition) + +; References +;----------- + +(type_identifier) @local.reference |