mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-04 14:38:16 +03:00
updated embedding queries for tsx and typescript
This commit is contained in:
parent
02f523094b
commit
debe6f107e
59
crates/zed/src/languages/tsx/embedding.scm
Normal file
59
crates/zed/src/languages/tsx/embedding.scm
Normal file
@ -0,0 +1,59 @@
|
||||
; (internal_module
|
||||
; "namespace" @context
|
||||
name: (_) @name) @item
|
||||
|
||||
(enum_declaration
|
||||
"enum" @context
|
||||
name: (_) @name) @item
|
||||
|
||||
; (type_alias_declaration
|
||||
; "type" @context
|
||||
name: (_) @name) @item
|
||||
|
||||
(function_declaration
|
||||
"async"? @context
|
||||
"function" @context
|
||||
name: (_) @name) @item
|
||||
|
||||
(interface_declaration
|
||||
"interface" @context
|
||||
name: (_) @name) @item
|
||||
|
||||
; (export_statement
|
||||
; (lexical_declaration
|
||||
; ["let" "const"] @context
|
||||
; (variable_declarator
|
||||
; name: (_) @name) @item))
|
||||
|
||||
(program
|
||||
(lexical_declaration
|
||||
["let" "const"] @context
|
||||
(variable_declarator
|
||||
name: (_) @name) @item))
|
||||
|
||||
(class_declaration
|
||||
"class" @context
|
||||
name: (_) @name) @item
|
||||
|
||||
(method_definition
|
||||
[
|
||||
"get"
|
||||
"set"
|
||||
"async"
|
||||
"*"
|
||||
"readonly"
|
||||
"static"
|
||||
(override_modifier)
|
||||
(accessibility_modifier)
|
||||
]* @context
|
||||
name: (_) @name) @item
|
||||
|
||||
; (public_field_definition
|
||||
; [
|
||||
; "declare"
|
||||
; "readonly"
|
||||
; "abstract"
|
||||
; "static"
|
||||
; (accessibility_modifier)
|
||||
; ]* @context
|
||||
; name: (_) @name) @item
|
59
crates/zed/src/languages/typescript/embedding.scm
Normal file
59
crates/zed/src/languages/typescript/embedding.scm
Normal file
@ -0,0 +1,59 @@
|
||||
; (internal_module
|
||||
; "namespace" @context
|
||||
; name: (_) @name) @item
|
||||
|
||||
(enum_declaration
|
||||
"enum" @context
|
||||
name: (_) @name) @item
|
||||
|
||||
; (type_alias_declaration
|
||||
; "type" @context
|
||||
; name: (_) @name) @item
|
||||
|
||||
(function_declaration
|
||||
"async"? @context
|
||||
"function" @context
|
||||
name: (_) @name) @item
|
||||
|
||||
(interface_declaration
|
||||
"interface" @context
|
||||
name: (_) @name) @item
|
||||
|
||||
; (export_statement
|
||||
; (lexical_declaration
|
||||
; ["let" "const"] @context
|
||||
; (variable_declarator
|
||||
; name: (_) @name) @item))
|
||||
|
||||
(program
|
||||
(lexical_declaration
|
||||
["let" "const"] @context
|
||||
(variable_declarator
|
||||
name: (_) @name) @item))
|
||||
|
||||
(class_declaration
|
||||
"class" @context
|
||||
name: (_) @name) @item
|
||||
|
||||
(method_definition
|
||||
[
|
||||
"get"
|
||||
"set"
|
||||
"async"
|
||||
"*"
|
||||
"readonly"
|
||||
"static"
|
||||
(override_modifier)
|
||||
(accessibility_modifier)
|
||||
]* @context
|
||||
name: (_) @name) @item
|
||||
|
||||
; (public_field_definition
|
||||
; [
|
||||
; "declare"
|
||||
; "readonly"
|
||||
; "abstract"
|
||||
; "static"
|
||||
; (accessibility_modifier)
|
||||
; ]* @context
|
||||
; name: (_) @name) @item
|
Loading…
Reference in New Issue
Block a user