summaryrefslogtreecommitdiff
path: root/queries/tsx.scm
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2026-01-21 20:22:09 +0100
committerMitja Felicijan <mitja.felicijan@gmail.com>2026-01-21 20:22:09 +0100
commit5a8dbc6347b3541e84fe669b22c17ad3b715e258 (patch)
treeb148c450939688caaaeb4adac6f2faa1eaffe649 /queries/tsx.scm
downloadqwe-editor-5a8dbc6347b3541e84fe669b22c17ad3b715e258.tar.gz
Engage!
Diffstat (limited to 'queries/tsx.scm')
-rw-r--r--queries/tsx.scm76
1 files changed, 76 insertions, 0 deletions
diff --git a/queries/tsx.scm b/queries/tsx.scm
new file mode 100644
index 0000000..d5207a0
--- /dev/null
+++ b/queries/tsx.scm
@@ -0,0 +1,76 @@
+(function_declaration name: (identifier) @function)
+(method_definition name: (property_identifier) @function)
+(call_expression function: (identifier) @function)
+(call_expression function: (member_expression property: (property_identifier) @function))
+
+(type_identifier) @type
+(predefined_type) @type
+
+(string) @string
+(number) @number
+(comment) @comment
+(regex) @string
+(template_string) @string
+
+(true) @boolean
+(false) @boolean
+(null) @null
+
+(property_signature name: (property_identifier) @property)
+(public_field_definition name: (property_identifier) @property)
+
+[
+ "function"
+ "return"
+ "if"
+ "else"
+ "for"
+ "while"
+ "do"
+ "switch"
+ "case"
+ "default"
+ "break"
+ "continue"
+ "var"
+ "let"
+ "const"
+ "try"
+ "catch"
+ "finally"
+ "class"
+ "extends"
+ "implements"
+ "import"
+ "export"
+ "from"
+ "async"
+ "await"
+ "new"
+ "interface"
+ "type"
+ "enum"
+ "public"
+ "private"
+ "protected"
+ "readonly"
+ "declare"
+ "module"
+ "namespace"
+ "abstract"
+ "as"
+ "keyof"
+ "typeof"
+ "instanceof"
+ "void"
+ "debugger"
+ "yield"
+] @keyword
+
+(this) @keyword
+(super) @keyword
+
+(jsx_opening_element name: (_) @function)
+(jsx_closing_element name: (_) @function)
+(jsx_self_closing_element name: (_) @function)
+(jsx_attribute (property_identifier) @property)