mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-07-19 10:45:02 +00:00
refactor: add compatibility for typst_syntax::LinkedNode.leaf_at
(#582)
* refactor: add compatibility for `typst_syntax::LinkedNode.leaf_at` * feat: `LinkedNodeExt` trait with `leaf_at_compat`
This commit is contained in:
parent
ffa12bc2c9
commit
ce107efc7e
23 changed files with 86 additions and 28 deletions
|
@ -1,4 +1,5 @@
|
|||
use once_cell::sync::OnceCell;
|
||||
use typst_shim::syntax::LinkedNodeExt;
|
||||
|
||||
use crate::{
|
||||
adt::interner::Interned,
|
||||
|
@ -27,7 +28,7 @@ impl SemanticRequest for SignatureHelpRequest {
|
|||
let source = ctx.source_by_path(&self.path).ok()?;
|
||||
let cursor = ctx.to_typst_pos(self.position, &source)? + 1;
|
||||
|
||||
let ast_node = LinkedNode::new(source.root()).leaf_at(cursor)?;
|
||||
let ast_node = LinkedNode::new(source.root()).leaf_at_compat(cursor)?;
|
||||
let CheckTarget::Param {
|
||||
callee,
|
||||
target,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue