mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-07-23 04:35:00 +00:00
feat: complete function parameters on signatures inferred by type checking (#203)
* dev: check upper bound types in assigning positions * dev: check template signatures * feat: completion with type sigatures * dev: document a bit * dev: save todo work on auto completion on user functions * dev: fix document target * dev: remove playground snaps * dev: fix ident target * dev: update snapshot
This commit is contained in:
parent
4ec4305fd5
commit
b35d897919
31 changed files with 850 additions and 113 deletions
|
@ -84,9 +84,14 @@ impl StatefulRequest for CompletionRequest {
|
|||
if let Some(d) = &deref_target {
|
||||
let node = d.node();
|
||||
// skip if is the let binding item, todo, check whether the pattern is exact
|
||||
// todo: check if the pattern(span) is exact, instead of just checking the
|
||||
// parent kind
|
||||
if matches!(
|
||||
node.parent_kind(),
|
||||
Some(SyntaxKind::LetBinding | SyntaxKind::Closure)
|
||||
(d, node.parent_kind()),
|
||||
(
|
||||
DerefTarget::VarAccess(..),
|
||||
Some(SyntaxKind::LetBinding | SyntaxKind::Closure)
|
||||
)
|
||||
) {
|
||||
return None;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue