summaryrefslogtreecommitdiff
path: root/crates/typst-library/src
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2024-11-10 12:15:28 +0100
committerLaurenz <laurmaedje@gmail.com>2024-11-13 10:21:40 +0100
commita5a4b0b72fcf948bc58dd5800eefbabb1d67a43d (patch)
tree3860f05b073a26b25584734a7b9aa61a67c9c61e /crates/typst-library/src
parent03ba5a0cb123fbfcb36dddfd1de4d710fef09a98 (diff)
Introduce `IdeWorld` trait
Diffstat (limited to 'crates/typst-library/src')
-rw-r--r--crates/typst-library/src/lib.rs16
1 files changed, 0 insertions, 16 deletions
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<i64>) -> Option<Datetime>;
-
- /// 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<EcoString>)] {
- &[]
- }
}
macro_rules! world_impl {
@@ -125,10 +113,6 @@ macro_rules! world_impl {
fn today(&self, offset: Option<i64>) -> Option<Datetime> {
self.deref().today(offset)
}
-
- fn packages(&self) -> &[(PackageSpec, Option<EcoString>)] {
- self.deref().packages()
- }
}
};
}