move collapsed only matches outside item parent in embedding.scm
This commit is contained in:
parent
bf5d9e3224
commit
9f160537ef
2 changed files with 20 additions and 2 deletions
|
@ -305,6 +305,11 @@ async fn test_code_context_retrieval_rust() {
|
||||||
todo!();
|
todo!();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Clone)]
|
||||||
|
struct D {
|
||||||
|
name: String
|
||||||
|
}
|
||||||
"
|
"
|
||||||
.unindent();
|
.unindent();
|
||||||
|
|
||||||
|
@ -361,6 +366,15 @@ async fn test_code_context_retrieval_rust() {
|
||||||
.unindent(),
|
.unindent(),
|
||||||
text.find("fn function_2").unwrap(),
|
text.find("fn function_2").unwrap(),
|
||||||
),
|
),
|
||||||
|
(
|
||||||
|
"
|
||||||
|
#[derive(Clone)]
|
||||||
|
struct D {
|
||||||
|
name: String
|
||||||
|
}"
|
||||||
|
.unindent(),
|
||||||
|
text.find("struct D").unwrap(),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1422,6 +1436,9 @@ fn rust_lang() -> Arc<Language> {
|
||||||
name: (_) @name)
|
name: (_) @name)
|
||||||
] @item
|
] @item
|
||||||
)
|
)
|
||||||
|
|
||||||
|
(attribute_item) @collapse
|
||||||
|
(use_declaration) @collapse
|
||||||
"#,
|
"#,
|
||||||
)
|
)
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
[(line_comment) (attribute_item)]* @context
|
[(line_comment) (attribute_item)]* @context
|
||||||
.
|
.
|
||||||
[
|
[
|
||||||
(attribute_item) @collapse
|
|
||||||
(use_declaration) @collapse
|
|
||||||
|
|
||||||
(struct_item
|
(struct_item
|
||||||
name: (_) @name)
|
name: (_) @name)
|
||||||
|
@ -29,3 +27,6 @@
|
||||||
name: (_) @name)
|
name: (_) @name)
|
||||||
] @item
|
] @item
|
||||||
)
|
)
|
||||||
|
|
||||||
|
(attribute_item) @collapse
|
||||||
|
(use_declaration) @collapse
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue