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:
Myriad-Dreamin 2024-04-20 15:03:46 +08:00 committed by GitHub
parent 4ec4305fd5
commit b35d897919
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 850 additions and 113 deletions

View file

@ -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;
}