aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/typescript/highlights.scm
diff options
context:
space:
mode:
authorGammut2023-07-09 16:35:32 +0000
committerGitHub2023-07-09 16:35:32 +0000
commit607b426e269b17f4ad32dca9c612c4a9f8541766 (patch)
treef9e57fa45041c066bf2ea4ecca692986f66291c1 /runtime/queries/typescript/highlights.scm
parent28452e1f2a63fe4806078da0f854d01506fc0c0c (diff)
Refactor queries for ecma based languages (#7207)
Diffstat (limited to 'runtime/queries/typescript/highlights.scm')
-rw-r--r--runtime/queries/typescript/highlights.scm83
1 files changed, 2 insertions, 81 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