feat: forbid signature help in some cases (#1742)

* feat: forbid signature help in some cases

* test: update snapshot
This commit is contained in:
Myriad-Dreamin 2025-05-06 14:55:24 +08:00 committed by GitHub
parent 29893aa15f
commit 4ded5a624a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 173 additions and 56 deletions

View file

@ -1334,6 +1334,22 @@ fn callee_context<'a>(callee: LinkedNode<'a>, node: LinkedNode<'a>) -> Option<Sy
};
let args = parent.find(args.span())?;
let mut parent = &node;
loop {
use SyntaxKind::*;
match parent.kind() {
ContentBlock | CodeBlock | Str | Raw | LineComment | BlockComment => {
return Option::None
}
Args if parent.range() == args.range() => {
break;
}
_ => {}
}
parent = parent.parent()?;
}
let is_set = parent.kind() == SyntaxKind::SetRule;
let target = arg_context(args.clone(), node, ArgSourceKind::Call)?;
Some(SyntaxContext::Arg {