diff options
Diffstat (limited to 'runtime/queries/typescript')
-rw-r--r-- | runtime/queries/typescript/highlights.scm | 83 | ||||
-rw-r--r-- | runtime/queries/typescript/indents.scm | 8 | ||||
-rw-r--r-- | runtime/queries/typescript/injections.scm | 4 | ||||
-rw-r--r-- | runtime/queries/typescript/locals.scm | 5 | ||||
-rw-r--r-- | runtime/queries/typescript/tags.scm | 24 | ||||
-rw-r--r-- | runtime/queries/typescript/textobjects.scm | 9 |
6 files changed, 14 insertions, 119 deletions
diff --git a/runtime/queries/typescript/highlights.scm b/runtime/queries/typescript/highlights.scm index 3ab9c746..5b8c8f24 100644 --- a/runtime/queries/typescript/highlights.scm +++ b/runtime/queries/typescript/highlights.scm @@ -1,82 +1,3 @@ -; Namespaces +; See runtime/queries/ecma/README.md for more info. -(internal_module - [((identifier) @namespace) ((nested_identifier (identifier) @namespace))]) - -(ambient_declaration "global" @namespace) - -; Variables - -(required_parameter (identifier) @variable.parameter) -(optional_parameter (identifier) @variable.parameter) - -; Punctuation - -[ - ":" -] @punctuation.delimiter - -(optional_parameter "?" @punctuation.special) -(property_signature "?" @punctuation.special) - -(conditional_type ["?" ":"] @operator) - -; Keywords - -[ - "abstract" - "declare" - "export" - "infer" - "implements" - "keyof" - "namespace" - "override" -] @keyword - -[ - "type" - "interface" - "enum" -] @keyword.storage.type - -[ - "public" - "private" - "protected" - "readonly" -] @keyword.storage.modifier - -; Types - -(type_identifier) @type -(predefined_type) @type.builtin - -(type_arguments - [ - "<" - ">" - ] @punctuation.bracket) - -(type_parameters - [ - "<" - ">" - ] @punctuation.bracket) - -((identifier) @type - (#match? @type "^[A-Z]")) - -; Literals - -[ - (template_literal_type) -] @string - -; Tokens - -(template_type - "${" @punctuation.special - "}" @punctuation.special) @embedded - -; inherits: ecma +; inherits: _typescript,ecma diff --git a/runtime/queries/typescript/indents.scm b/runtime/queries/typescript/indents.scm index 34db2741..5b8c8f24 100644 --- a/runtime/queries/typescript/indents.scm +++ b/runtime/queries/typescript/indents.scm @@ -1,7 +1,3 @@ -; inherits: ecma +; See runtime/queries/ecma/README.md for more info. -[ - (enum_declaration) - (interface_declaration) - (object_type) -] @indent +; inherits: _typescript,ecma diff --git a/runtime/queries/typescript/injections.scm b/runtime/queries/typescript/injections.scm index 04328f09..5b8c8f24 100644 --- a/runtime/queries/typescript/injections.scm +++ b/runtime/queries/typescript/injections.scm @@ -1 +1,3 @@ -; inherits: ecma +; See runtime/queries/ecma/README.md for more info. + +; inherits: _typescript,ecma diff --git a/runtime/queries/typescript/locals.scm b/runtime/queries/typescript/locals.scm index aa6d6ffd..5b8c8f24 100644 --- a/runtime/queries/typescript/locals.scm +++ b/runtime/queries/typescript/locals.scm @@ -1,2 +1,3 @@ -(required_parameter (identifier) @local.definition) -(optional_parameter (identifier) @local.definition) +; See runtime/queries/ecma/README.md for more info. + +; inherits: _typescript,ecma diff --git a/runtime/queries/typescript/tags.scm b/runtime/queries/typescript/tags.scm index ccae934e..5b8c8f24 100644 --- a/runtime/queries/typescript/tags.scm +++ b/runtime/queries/typescript/tags.scm @@ -1,23 +1,3 @@ -(function_signature - name: (identifier) @name) @definition.function +; See runtime/queries/ecma/README.md for more info. -(method_signature - name: (property_identifier) @name) @definition.method - -(abstract_method_signature - name: (property_identifier) @name) @definition.method - -(abstract_class_declaration - name: (type_identifier) @name) @definition.class - -(module - name: (identifier) @name) @definition.module - -(interface_declaration - name: (type_identifier) @name) @definition.interface - -(type_annotation - (type_identifier) @name) @reference.type - -(new_expression - constructor: (identifier) @name) @reference.class +; inherits: _typescript,ecma diff --git a/runtime/queries/typescript/textobjects.scm b/runtime/queries/typescript/textobjects.scm index 57be8b5f..5b8c8f24 100644 --- a/runtime/queries/typescript/textobjects.scm +++ b/runtime/queries/typescript/textobjects.scm @@ -1,8 +1,3 @@ -; inherits: ecma +; See runtime/queries/ecma/README.md for more info. -[ - (interface_declaration - body:(_) @class.inside) - (type_alias_declaration - value: (_) @class.inside) -] @class.around +; inherits: _typescript,ecma |