mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-10 12:19:28 +00:00
update embedding query for tsx to accomodate for leading comments
This commit is contained in:
parent
d4971e9ead
commit
2dae42b1ba
1 changed files with 54 additions and 33 deletions
|
@ -1,35 +1,56 @@
|
||||||
(enum_declaration
|
(
|
||||||
"enum" @context
|
(comment)* @context
|
||||||
name: (_) @name) @item
|
.
|
||||||
|
(enum_declaration
|
||||||
|
"enum" @context
|
||||||
|
name: (_) @name) @item
|
||||||
|
)
|
||||||
|
|
||||||
(function_declaration
|
(
|
||||||
"async"? @context
|
(comment)* @context
|
||||||
"function" @context
|
.
|
||||||
name: (_) @name) @item
|
|
||||||
|
|
||||||
(interface_declaration
|
|
||||||
"interface" @context
|
|
||||||
name: (_) @name) @item
|
|
||||||
|
|
||||||
(program
|
|
||||||
(lexical_declaration
|
|
||||||
["let" "const"] @context
|
|
||||||
(variable_declarator
|
|
||||||
name: (_) @name) @item))
|
|
||||||
|
|
||||||
(class_declaration
|
|
||||||
"class" @context
|
|
||||||
name: (_) @name) @item
|
|
||||||
|
|
||||||
(method_definition
|
|
||||||
[
|
[
|
||||||
"get"
|
(export_statement
|
||||||
"set"
|
(function_declaration
|
||||||
"async"
|
"async"? @name
|
||||||
"*"
|
"function" @name
|
||||||
"readonly"
|
name: (_) @name)
|
||||||
"static"
|
) @item
|
||||||
(override_modifier)
|
(function_declaration
|
||||||
(accessibility_modifier)
|
"async"? @name
|
||||||
]* @context
|
"function" @name
|
||||||
name: (_) @name) @item
|
name: (_) @name) @item
|
||||||
|
])
|
||||||
|
|
||||||
|
(
|
||||||
|
(comment)* @context
|
||||||
|
.
|
||||||
|
(interface_declaration
|
||||||
|
"interface" @name
|
||||||
|
name: (_) @name) @item
|
||||||
|
)
|
||||||
|
|
||||||
|
(
|
||||||
|
(comment)* @context
|
||||||
|
.
|
||||||
|
(class_declaration
|
||||||
|
"class" @name
|
||||||
|
name: (_) @name) @item
|
||||||
|
)
|
||||||
|
|
||||||
|
(
|
||||||
|
(comment)* @context
|
||||||
|
.
|
||||||
|
(method_definition
|
||||||
|
[
|
||||||
|
"get"
|
||||||
|
"set"
|
||||||
|
"async"
|
||||||
|
"*"
|
||||||
|
"readonly"
|
||||||
|
"static"
|
||||||
|
(override_modifier)
|
||||||
|
(accessibility_modifier)
|
||||||
|
]* @name
|
||||||
|
name: (_) @name) @item
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in a new issue