feat: classify field accesses for ide functions (#1034)

* feat: classify field accesses for ide functions

* test: update snapshot
This commit is contained in:
Myriad-Dreamin 2024-12-20 18:47:44 +08:00 committed by GitHub
parent 7dbaca8851
commit 39243ba626
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 216 additions and 81 deletions

View file

@ -89,7 +89,8 @@ impl StatefulRequest for CompletionRequest {
let explicit = false;
// Skip if is the let binding item *directly*
if let Some(SyntaxClass::VarAccess(node)) = &syntax {
if let Some(SyntaxClass::VarAccess(var)) = &syntax {
let node = var.node();
match node.parent_kind() {
// complete the init part of the let binding
Some(SyntaxKind::LetBinding) => {