mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-08-04 02:08:17 +00:00
feat: prepublish tinymist-world (#1248)
This commit is contained in:
parent
d534325c83
commit
88912bc12e
17 changed files with 220 additions and 78 deletions
|
@ -40,8 +40,7 @@ notify.workspace = true
|
|||
[features]
|
||||
|
||||
fonts = ["typst-assets/fonts"]
|
||||
# "reflexo-typst/no-content-hint"
|
||||
no-content-hint = []
|
||||
no-content-hint = ["reflexo-typst/no-content-hint"]
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
|
|
@ -56,23 +56,14 @@ pub trait WorldProvider {
|
|||
impl WorldProvider for CompileOnceArgs {
|
||||
fn resolve(&self) -> Result<LspUniverse> {
|
||||
let entry = self.entry()?.try_into()?;
|
||||
let inputs = self
|
||||
.inputs
|
||||
.iter()
|
||||
.map(|(k, v)| (Str::from(k.as_str()), Value::Str(Str::from(v.as_str()))))
|
||||
.collect();
|
||||
let fonts = LspUniverseBuilder::resolve_fonts(self.font.clone())?;
|
||||
let inputs = self.resolve_inputs().unwrap_or_default();
|
||||
let fonts = Arc::new(LspUniverseBuilder::resolve_fonts(self.font.clone())?);
|
||||
let package = LspUniverseBuilder::resolve_package(
|
||||
self.cert.as_deref().map(From::from),
|
||||
Some(&self.package),
|
||||
);
|
||||
|
||||
Ok(LspUniverseBuilder::build(
|
||||
entry,
|
||||
Arc::new(LazyHash::new(inputs)),
|
||||
Arc::new(fonts),
|
||||
package,
|
||||
))
|
||||
Ok(LspUniverseBuilder::build(entry, inputs, fonts, package))
|
||||
}
|
||||
|
||||
fn entry(&self) -> Result<EntryOpts> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue