dev: complete labels with tolerating syntax error (#974)

This commit is contained in:
Myriad-Dreamin 2024-12-10 16:05:19 +08:00 committed by GitHub
parent 00195884de
commit 2f882378bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 42 additions and 31 deletions

View file

@ -48,7 +48,7 @@ pub(crate) fn find_references(
) -> Option<Vec<LspLocation>> {
let finding_label = match target {
DerefTarget::VarAccess(..) | DerefTarget::Callee(..) => false,
DerefTarget::Label(..) | DerefTarget::Ref(..) => true,
DerefTarget::Label(..) | DerefTarget::LabelError(..) | DerefTarget::Ref(..) => true,
DerefTarget::ImportPath(..) | DerefTarget::IncludePath(..) | DerefTarget::Normal(..) => {
return None;
}