mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-11-24 13:10:07 +00:00
fix: complete import path by syntax instead of type (#968)
* fix: complete import path by syntax instead of type * test: add import package tests * fix: unused item
This commit is contained in:
parent
fee46d2123
commit
ab234634a9
7 changed files with 55 additions and 14 deletions
|
|
@ -1,4 +1,5 @@
|
|||
use core::fmt;
|
||||
use std::str::FromStr;
|
||||
use std::sync::{Arc, OnceLock};
|
||||
use std::{
|
||||
collections::{HashMap, HashSet},
|
||||
|
|
@ -7,6 +8,7 @@ use std::{
|
|||
};
|
||||
|
||||
use once_cell::sync::Lazy;
|
||||
use reflexo_typst::package::PackageSpec;
|
||||
use reflexo_typst::world::EntryState;
|
||||
use reflexo_typst::{CompileDriverImpl, EntryManager, EntryReader, ShadowApi};
|
||||
use serde_json::{ser::PrettyFormatter, Serializer, Value};
|
||||
|
|
@ -85,6 +87,12 @@ pub fn run_with_ctx<T>(
|
|||
})
|
||||
.snapshot(w);
|
||||
|
||||
ctx.test_package_list(|| {
|
||||
vec![(
|
||||
PackageSpec::from_str("@preview/example:0.1.0").unwrap(),
|
||||
Some("example package (mock).".into()),
|
||||
)]
|
||||
});
|
||||
ctx.test_completion_files(Vec::new);
|
||||
ctx.test_files(|| paths);
|
||||
f(&mut ctx, p)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue