fix: new typst

This commit is contained in:
Myriad-Dreamin 2025-02-08 15:10:49 +08:00
parent 8f9dc2e1aa
commit ca624d391a
3 changed files with 4 additions and 5 deletions

View file

@ -110,7 +110,7 @@ impl<F: CompilerFeat + 'static> CompileSnapshot<F> {
pub fn compile(self) -> CompiledArtifact<F> {
let mut snap = self;
snap.world.set_is_compiling(true);
let res = ::typst::compile::<tinymist_std::typst::TypstPagedDocument>(&snap.world);
let res = ::typst::compile(&snap.world);
let warned = match res.output {
Ok(doc) => Ok(Warned {
output: Arc::new(doc),

View file

@ -1,6 +1,5 @@
use std::{collections::BTreeMap, path::Path, sync::Arc};
use reflexo_typst::TypstPagedDocument;
use reflexo_typst::{vector::font::GlyphId, TypstFont};
use sync_lsp::LspResult;
use tinymist_project::LspCompileSnapshot;
@ -989,7 +988,7 @@ impl ServerState {
.map_err(|e| error_once!("cannot map shadow", err: e))
.map_err(internal_error)?;
let sym_doc = typst::compile::<TypstPagedDocument>(&forked)
let sym_doc = typst::compile(&forked)
.output
.map_err(|e| error_once!("cannot compile symbols", err: format!("{e:?}")))
.map_err(internal_error)?;

View file

@ -7,7 +7,7 @@ use base64::Engine;
use hyper::service::service_fn;
use hyper_util::{rt::TokioIo, server::graceful::GracefulShutdown};
use lsp_server::RequestId;
use reflexo_typst::{TypstDict, TypstPagedDocument};
use reflexo_typst::TypstDict;
use serde::{Deserialize, Serialize};
use serde_json::Value as JsonValue;
use sync_lsp::{just_future, LspClient, SchedulableResponse};
@ -165,7 +165,7 @@ async fn trace_main(
req_id: RequestId,
) -> ! {
typst_timing::enable();
let res = typst::compile::<TypstPagedDocument>(w);
let res = typst::compile(w);
let diags = match &res.output {
Ok(_res) => res.warnings,
Err(errors) => errors.clone(),