From a5a4b0b72fcf948bc58dd5800eefbabb1d67a43d Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sun, 10 Nov 2024 12:15:28 +0100 Subject: Introduce `IdeWorld` trait --- crates/typst-library/src/lib.rs | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'crates/typst-library/src') diff --git a/crates/typst-library/src/lib.rs b/crates/typst-library/src/lib.rs index 55cd1132..4db377e9 100644 --- a/crates/typst-library/src/lib.rs +++ b/crates/typst-library/src/lib.rs @@ -27,8 +27,6 @@ pub mod visualize; use std::ops::{Deref, Range}; -use ecow::EcoString; -use typst_syntax::package::PackageSpec; use typst_syntax::{FileId, Source, Span}; use typst_utils::{LazyHash, SmallBitSet}; @@ -83,16 +81,6 @@ pub trait World: Send + Sync { /// If this function returns `None`, Typst's `datetime` function will /// return an error. fn today(&self, offset: Option) -> Option; - - /// A list of all available packages and optionally descriptions for them. - /// - /// This function is optional to implement. It enhances the user experience - /// by enabling autocompletion for packages. Details about packages from the - /// `@preview` namespace are available from - /// `https://packages.typst.org/preview/index.json`. - fn packages(&self) -> &[(PackageSpec, Option)] { - &[] - } } macro_rules! world_impl { @@ -125,10 +113,6 @@ macro_rules! world_impl { fn today(&self, offset: Option) -> Option { self.deref().today(offset) } - - fn packages(&self) -> &[(PackageSpec, Option)] { - self.deref().packages() - } } }; } -- cgit v1.2.3