mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-08-02 01:12:16 +00:00
feat: add package related arguments to typstExtraArgs (#923)
* feat: use typst-kit's package functions * feat: add package related arguments to `typstExtraArgs` * feat: don't use typst-kit's downloader * dev: improve a bit * dev: less lazy * dev: less interfaces
This commit is contained in:
parent
531b8d6737
commit
032c81e93a
13 changed files with 665 additions and 785 deletions
|
@ -8,7 +8,7 @@ use parking_lot::Mutex;
|
|||
use reflexo_typst::typst::prelude::*;
|
||||
use reflexo_typst::{package::PackageSpec, TypstFileId};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use tinymist_world::https::HttpsRegistry;
|
||||
use tinymist_world::package::HttpsRegistry;
|
||||
use typst::diag::{EcoString, StrResult};
|
||||
use typst::syntax::package::PackageManifest;
|
||||
use typst::syntax::VirtualPath;
|
||||
|
|
|
@ -131,6 +131,7 @@ pub fn run_with_sources<T>(source: &str, f: impl FnOnce(&mut LspUniverse, PathBu
|
|||
};
|
||||
let mut world = LspUniverseBuilder::build(
|
||||
EntryState::new_rooted(root.as_path().into(), None),
|
||||
Default::default(),
|
||||
Arc::new(
|
||||
LspUniverseBuilder::resolve_fonts(CompileFontArgs {
|
||||
ignore_system_fonts: true,
|
||||
|
@ -138,8 +139,7 @@ pub fn run_with_sources<T>(source: &str, f: impl FnOnce(&mut LspUniverse, PathBu
|
|||
})
|
||||
.unwrap(),
|
||||
),
|
||||
Default::default(),
|
||||
None,
|
||||
LspUniverseBuilder::resolve_package(None, None),
|
||||
)
|
||||
.unwrap();
|
||||
let sources = source.split("-----");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue