diff options
| author | cAttte <26514199+cAttte@users.noreply.github.com> | 2025-06-09 11:16:47 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-09 14:16:47 +0000 |
| commit | df4c08f852ba3342e69caa721067804a7152e166 (patch) | |
| tree | caa136c71ebca94c02d631b8b8e3f85732a45da6 /crates/typst-ide/src/utils.rs | |
| parent | 832fab58b31a16d049418bdbfe98b0352758579f (diff) | |
Autocomplete fixes for math mode (#6415)
Diffstat (limited to 'crates/typst-ide/src/utils.rs')
| -rw-r--r-- | crates/typst-ide/src/utils.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/typst-ide/src/utils.rs b/crates/typst-ide/src/utils.rs index 887e851f..13de402b 100644 --- a/crates/typst-ide/src/utils.rs +++ b/crates/typst-ide/src/utils.rs @@ -114,7 +114,9 @@ pub fn globals<'a>(world: &'a dyn IdeWorld, leaf: &LinkedNode) -> &'a Scope { | Some(SyntaxKind::Math) | Some(SyntaxKind::MathFrac) | Some(SyntaxKind::MathAttach) - ); + ) && leaf + .prev_leaf() + .is_none_or(|prev| !matches!(prev.kind(), SyntaxKind::Hash)); let library = world.library(); if in_math { |
