mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-07-23 04:35:00 +00:00
feat: find references for Ref
and Label
(#527)
* add test for `goto_definition` with label reference * simplify test for `goto_definition` with reference * abstract compile doc for test * add snap for goto_definition label reference * basic goto_reference with simple test * basic find_reference for Ref * fix: a bug in linked def * Remove unwanted compile directive compile: true * simply compile and get depended files fail for corss_file_ref_label * update ref reference but still fail to get source from path * fix: reuse find definition effort and handle undefined references for labels * dev: update test case * fix: label reference analysis * fix: rust analyzer doing bad * dev: update snapshot * dev: lift common pattern * fix: unstable snapshot --------- Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>
This commit is contained in:
parent
0fce237d57
commit
1295c8754a
17 changed files with 249 additions and 169 deletions
|
@ -320,12 +320,7 @@ mod tests {
|
|||
let mut includes = HashSet::new();
|
||||
let mut excludes = HashSet::new();
|
||||
|
||||
let must_compile = has_test_property(&properties, "compile");
|
||||
let doc = if must_compile {
|
||||
compile_doc_for_test(ctx)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let doc = compile_doc_for_test(ctx, &properties);
|
||||
|
||||
for kk in properties.get("contains").iter().flat_map(|v| v.split(',')) {
|
||||
// split first char
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue