mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-07-19 10:45:02 +00:00
refactor: final touch and complete matchers (#1036)
* perf: minor optimize matches to dot access * refactor: final touch and complete matchers * dev: change name back
This commit is contained in:
parent
980571ad61
commit
1eb63870fd
7 changed files with 419 additions and 346 deletions
|
@ -4,7 +4,7 @@ use typst_shim::syntax::LinkedNodeExt;
|
|||
use crate::{
|
||||
adt::interner::Interned,
|
||||
prelude::*,
|
||||
syntax::{classify_cursor, classify_syntax, ArgClass, CursorClass},
|
||||
syntax::{classify_context, classify_syntax, ArgClass, SyntaxContext},
|
||||
LspParamInfo, SemanticRequest,
|
||||
};
|
||||
|
||||
|
@ -28,12 +28,12 @@ impl SemanticRequest for SignatureHelpRequest {
|
|||
let cursor = ctx.to_typst_pos(self.position, &source)? + 1;
|
||||
|
||||
let ast_node = LinkedNode::new(source.root()).leaf_at_compat(cursor)?;
|
||||
let CursorClass::Arg {
|
||||
let SyntaxContext::Arg {
|
||||
callee,
|
||||
target,
|
||||
is_set,
|
||||
..
|
||||
} = classify_cursor(ast_node, Some(cursor))?
|
||||
} = classify_context(ast_node, Some(cursor))?
|
||||
else {
|
||||
return None;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue