dev: borrow the document state inside of compiler (#33)

This commit is contained in:
Myriad-Dreamin 2024-03-14 20:37:14 +08:00 committed by GitHub
parent c7825c3174
commit 9d344570b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 34 additions and 27 deletions

View file

@ -3,6 +3,10 @@ pub mod analysis;
pub(crate) mod diagnostics;
use std::sync::Arc;
use typst_ts_core::TypstDocument;
pub use diagnostics::*;
pub(crate) mod signature_help;
pub use signature_help::*;
@ -40,6 +44,12 @@ pub use lsp_typst_boundary::*;
mod prelude;
#[derive(Debug, Clone)]
pub struct VersionedDocument {
pub version: usize,
pub document: Arc<TypstDocument>,
}
mod polymorphic {
use super::prelude::*;
use super::*;