mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-07-23 12:45:04 +00:00
fix: complete field access even if its parent is a closure (#1019)
* dev: complete field access even if it's parent is a closure * test: update snapshot
This commit is contained in:
parent
e116b0b645
commit
142138297e
3 changed files with 12 additions and 4 deletions
|
@ -98,7 +98,12 @@ impl StatefulRequest for CompletionRequest {
|
|||
let parent_init = parent.find(parent_init.span())?;
|
||||
parent_init.find(node.span())?;
|
||||
}
|
||||
Some(SyntaxKind::Closure) => return None,
|
||||
Some(SyntaxKind::Closure) => {
|
||||
let parent = node.parent()?;
|
||||
let parent_body = parent.cast::<ast::Closure>()?.body();
|
||||
let parent_body = parent.find(parent_body.span())?;
|
||||
parent_body.find(node.span())?;
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue