mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-12-23 08:47:50 +00:00
fix: fix compile errors (#2132)
Some checks are pending
tinymist::ci / Duplicate Actions Detection (push) Waiting to run
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Waiting to run
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Waiting to run
tinymist::ci / prepare-build (push) Waiting to run
tinymist::ci / announce (push) Blocked by required conditions
tinymist::ci / build (push) Blocked by required conditions
Some checks are pending
tinymist::ci / Duplicate Actions Detection (push) Waiting to run
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Waiting to run
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Waiting to run
tinymist::ci / prepare-build (push) Waiting to run
tinymist::ci / announce (push) Blocked by required conditions
tinymist::ci / build (push) Blocked by required conditions
This commit is contained in:
parent
be75cd9a97
commit
0047d61e51
10 changed files with 40 additions and 40 deletions
|
|
@ -2,21 +2,21 @@
|
|||
|
||||
mod tooltip;
|
||||
|
||||
pub use tooltip::{Tooltip, tooltip_};
|
||||
pub use tooltip::{tooltip_, Tooltip};
|
||||
|
||||
use std::{collections::HashMap, fmt::Write, sync::LazyLock};
|
||||
|
||||
use comemo::Tracked;
|
||||
use ecow::{EcoString, eco_format};
|
||||
use ecow::{eco_format, EcoString};
|
||||
use serde::Deserialize;
|
||||
use serde_yaml as yaml;
|
||||
use typst::{
|
||||
Category, Library, LibraryExt, World,
|
||||
diag::{StrResult, bail},
|
||||
diag::{bail, StrResult},
|
||||
foundations::{Binding, Content, Func, Module, Type, Value},
|
||||
introspection::MetadataElem,
|
||||
syntax::Span,
|
||||
text::{FontInfo, FontStyle},
|
||||
Category, Library, LibraryExt, World,
|
||||
};
|
||||
|
||||
/// Extract the first sentence of plain text of a piece of documentation.
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ use std::collections::HashSet;
|
|||
use std::path::Path;
|
||||
use std::sync::{Arc, OnceLock};
|
||||
|
||||
use ecow::{EcoVec, eco_vec};
|
||||
use ecow::{eco_vec, EcoVec};
|
||||
use tinymist_std::error::prelude::Result;
|
||||
use tinymist_std::{ImmutPath, typst::TypstDocument};
|
||||
use tinymist_std::{typst::TypstDocument, ImmutPath};
|
||||
use tinymist_task::ExportTarget;
|
||||
use tinymist_world::vfs::notify::{
|
||||
FilesystemEvent, MemoryEvent, NotifyDeps, NotifyMessage, UpstreamUpdateEvent,
|
||||
|
|
|
|||
|
|
@ -4,26 +4,26 @@ use std::cmp::Reverse;
|
|||
use std::collections::{BTreeMap, HashSet};
|
||||
use std::ops::Range;
|
||||
|
||||
use ecow::{EcoString, eco_format};
|
||||
use ecow::{eco_format, EcoString};
|
||||
use if_chain::if_chain;
|
||||
use lsp_types::InsertTextFormat;
|
||||
use regex::{Captures, Regex};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use tinymist_analysis::syntax::{BadCompletionCursor, bad_completion_cursor};
|
||||
use tinymist_analysis::{DynLabel, analyze_labels, func_signature};
|
||||
use tinymist_analysis::syntax::{bad_completion_cursor, BadCompletionCursor};
|
||||
use tinymist_analysis::{analyze_labels, func_signature, DynLabel};
|
||||
use tinymist_derive::BindTyCtx;
|
||||
use tinymist_project::LspWorld;
|
||||
use tinymist_std::path::unix_slash;
|
||||
use tinymist_std::typst::TypstDocument;
|
||||
use typst::World;
|
||||
use typst::foundations::{
|
||||
AutoValue, Func, Label, NoneValue, Repr, Scope, StyleChain, Type, Value, fields_on, format_str,
|
||||
repr,
|
||||
fields_on, format_str, repr, AutoValue, Func, Label, NoneValue, Repr, Scope, StyleChain, Type,
|
||||
Value,
|
||||
};
|
||||
use typst::syntax::ast::{self, AstNode, Param};
|
||||
use typst::syntax::{is_id_continue, is_id_start, is_ident};
|
||||
use typst::text::RawElem;
|
||||
use typst::visualize::Color;
|
||||
use typst::World;
|
||||
use typst_shim::{syntax::LinkedNodeExt, utils::hash128};
|
||||
use unscanny::Scanner;
|
||||
|
||||
|
|
@ -31,14 +31,14 @@ use crate::adt::interner::Interned;
|
|||
use crate::analysis::{BuiltinTy, LocalContext, PathPreference, Ty};
|
||||
use crate::completion::{
|
||||
Completion, CompletionCommand, CompletionContextKey, CompletionItem, CompletionKind,
|
||||
DEFAULT_POSTFIX_SNIPPET, DEFAULT_PREFIX_SNIPPET, EcoTextEdit, ParsedSnippet, PostfixSnippet,
|
||||
PostfixSnippetScope, PrefixSnippet,
|
||||
EcoTextEdit, ParsedSnippet, PostfixSnippet, PostfixSnippetScope, PrefixSnippet,
|
||||
DEFAULT_POSTFIX_SNIPPET, DEFAULT_PREFIX_SNIPPET,
|
||||
};
|
||||
use crate::prelude::*;
|
||||
use crate::syntax::{
|
||||
InterpretMode, PreviousDecl, SurroundingSyntax, SyntaxClass, SyntaxContext, VarClass,
|
||||
classify_context, interpret_mode_at, is_ident_like, node_ancestors, previous_decls,
|
||||
surrounding_syntax,
|
||||
surrounding_syntax, InterpretMode, PreviousDecl, SurroundingSyntax, SyntaxClass, SyntaxContext,
|
||||
VarClass,
|
||||
};
|
||||
use crate::ty::{
|
||||
DynTypeBounds, Iface, IfaceChecker, InsTy, SigTy, TyCtx, TypeInfo, TypeInterface, TypeVar,
|
||||
|
|
@ -871,7 +871,7 @@ pub fn symbol_detail(s: &str) -> EcoString {
|
|||
codes.join(" + ")
|
||||
};
|
||||
|
||||
format!("{}, unicode: `{}`", ld, unicode_repr).into()
|
||||
format!("{ld}, unicode: `{unicode_repr}`").into()
|
||||
}
|
||||
|
||||
/// If is printable, return the symbol itself.
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ use tinymist_project::LspWorld;
|
|||
use tinymist_std::typst::TypstDocument;
|
||||
use tinymist_world::debug_loc::SourceSpanOffset;
|
||||
use typst::{
|
||||
World,
|
||||
layout::{Frame, FrameItem, Point, Position, Size},
|
||||
syntax::{LinkedNode, Source, Span, SyntaxKind},
|
||||
visualize::Geometry,
|
||||
World,
|
||||
};
|
||||
use typst_shim::syntax::LinkedNodeExt;
|
||||
|
||||
|
|
|
|||
|
|
@ -7,33 +7,33 @@ use std::{
|
|||
};
|
||||
|
||||
use crate::{
|
||||
CompileSnapshot, MEMORY_MAIN_ENTRY,
|
||||
package::{PackageRegistry, PackageSpec},
|
||||
source::SourceDb,
|
||||
CompileSnapshot, MEMORY_MAIN_ENTRY,
|
||||
};
|
||||
use crate::{
|
||||
WorldComputeGraph,
|
||||
parser::{
|
||||
OffsetEncoding, SemanticToken, SemanticTokensLegend, get_semantic_tokens_full,
|
||||
get_semantic_tokens_legend,
|
||||
get_semantic_tokens_full, get_semantic_tokens_legend, OffsetEncoding, SemanticToken,
|
||||
SemanticTokensLegend,
|
||||
},
|
||||
WorldComputeGraph,
|
||||
};
|
||||
use ecow::EcoVec;
|
||||
use tinymist_std::{ImmutPath, error::prelude::*};
|
||||
use tinymist_std::{error::prelude::*, ImmutPath};
|
||||
use tinymist_vfs::{
|
||||
FileId, FsProvider, PathResolution, RevisingVfs, SourceCache, Vfs, WorkspaceResolver,
|
||||
};
|
||||
use typst::{
|
||||
Features, Library, LibraryExt, World, WorldExt,
|
||||
diag::{At, EcoString, FileError, FileResult, SourceResult, eco_format},
|
||||
diag::{eco_format, At, EcoString, FileError, FileResult, SourceResult},
|
||||
foundations::{Bytes, Datetime, Dict},
|
||||
syntax::{Source, Span, VirtualPath},
|
||||
text::{Font, FontBook},
|
||||
utils::LazyHash,
|
||||
Features, Library, LibraryExt, World, WorldExt,
|
||||
};
|
||||
// use crate::source::{SharedState, SourceCache, SourceDb};
|
||||
use crate::entry::{DETACHED_ENTRY, EntryManager, EntryReader, EntryState};
|
||||
use crate::{CompilerFeat, ShadowApi, WorldDeps, font::FontResolver};
|
||||
use crate::entry::{EntryManager, EntryReader, EntryState, DETACHED_ENTRY};
|
||||
use crate::{font::FontResolver, CompilerFeat, ShadowApi, WorldDeps};
|
||||
|
||||
type CodespanResult<T> = Result<T, CodespanError>;
|
||||
type CodespanError = codespan_reporting::files::Error;
|
||||
|
|
@ -807,7 +807,7 @@ impl<F: CompilerFeat> World for CompilerWorld<F> {
|
|||
/// return an error.
|
||||
#[cfg(not(any(feature = "web", feature = "system")))]
|
||||
fn today(&self, offset: Option<i64>) -> Option<Datetime> {
|
||||
use tinymist_std::time::{Duration, now, to_typst_time};
|
||||
use tinymist_std::time::{now, to_typst_time, Duration};
|
||||
|
||||
let now = self.now.get_or_init(|| {
|
||||
if let Some(timestamp) = self.creation_timestamp {
|
||||
|
|
|
|||
|
|
@ -17,13 +17,13 @@ use tinymist_query::package::PackageInfo;
|
|||
use tinymist_query::{LocalContextGuard, LspRange};
|
||||
use tinymist_std::error::prelude::*;
|
||||
use tinymist_task::ExportMarkdownTask;
|
||||
use typst::diag::{EcoString, StrResult, eco_format};
|
||||
use typst::diag::{eco_format, EcoString, StrResult};
|
||||
use typst::syntax::package::{PackageSpec, VersionlessPackageSpec};
|
||||
use typst::syntax::{LinkedNode, Source};
|
||||
use world::TaskInputs;
|
||||
|
||||
use super::*;
|
||||
use crate::lsp::query::{LspClientExt, run_query};
|
||||
use crate::lsp::query::{run_query, LspClientExt};
|
||||
use crate::tool::ast::AstRepr;
|
||||
use crate::tool::package::InitTask;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,15 +2,15 @@ use std::sync::LazyLock;
|
|||
use std::{collections::BTreeMap, path::Path, sync::Arc};
|
||||
|
||||
use reflexo_typst::TypstPagedDocument;
|
||||
use reflexo_typst::{TypstFont, vector::font::GlyphId};
|
||||
use reflexo_typst::{vector::font::GlyphId, TypstFont};
|
||||
use sync_ls::LspResult;
|
||||
use tinymist_std::typst::TypstDocument;
|
||||
use typst::foundations::Bytes;
|
||||
use typst::{World, syntax::VirtualPath};
|
||||
use typst::{syntax::VirtualPath, World};
|
||||
|
||||
use super::prelude::*;
|
||||
use crate::project::LspComputeGraph;
|
||||
use crate::world::{EntryState, TaskInputs, base::ShadowApi};
|
||||
use crate::world::{base::ShadowApi, EntryState, TaskInputs};
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
|
|
|
|||
|
|
@ -5,20 +5,20 @@ use std::path::PathBuf;
|
|||
use std::sync::{Arc, LazyLock};
|
||||
|
||||
use crate::{
|
||||
ColorTheme,
|
||||
attributes::{IdocAttr, TypliteAttrsParser, md_attr},
|
||||
attributes::{md_attr, IdocAttr, TypliteAttrsParser},
|
||||
common::ExternalFrameNode,
|
||||
ColorTheme,
|
||||
};
|
||||
use base64::Engine;
|
||||
use cmark_writer::ast::{HtmlAttribute, HtmlElement as CmarkHtmlElement, Node};
|
||||
use ecow::{EcoString, eco_format};
|
||||
use ecow::{eco_format, EcoString};
|
||||
use tinymist_project::system::print_diagnostics_to_string;
|
||||
use tinymist_project::{EntryReader, MEMORY_MAIN_ENTRY, TaskInputs, base::ShadowApi};
|
||||
use tinymist_project::{base::ShadowApi, EntryReader, TaskInputs, MEMORY_MAIN_ENTRY};
|
||||
use typst::{
|
||||
World,
|
||||
foundations::{Bytes, Dict, IntoValue},
|
||||
layout::{Abs, Frame},
|
||||
utils::LazyHash,
|
||||
World,
|
||||
};
|
||||
use typst_html::{HtmlElement, HtmlNode};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
//! Typst Evaluation
|
||||
|
||||
use comemo::Track;
|
||||
use typst::World;
|
||||
use typst::diag::SourceResult;
|
||||
use typst::engine::{Engine, Route, Sink, Traced};
|
||||
use typst::foundations::{Context, Func, Module, Value};
|
||||
use typst::introspection::Introspector;
|
||||
use typst::syntax::Source;
|
||||
use typst::World;
|
||||
|
||||
pub use typst_eval::*;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
//! Typst Evaluation
|
||||
|
||||
use comemo::Track;
|
||||
use typst::World;
|
||||
use typst::diag::SourceResult;
|
||||
use typst::engine::{Engine, Route, Sink, Traced};
|
||||
use typst::foundations::{Context, Func, Module, Value};
|
||||
use typst::introspection::Introspector;
|
||||
use typst::syntax::Source;
|
||||
use typst::World;
|
||||
|
||||
pub use typst_eval::*;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue