dev: cache expression information correctly (#736)

* dev: cache expression information correctly

* rev
This commit is contained in:
Myriad-Dreamin 2024-10-27 20:20:59 +08:00 committed by GitHub
parent 2c38695b6f
commit 1d49e110e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 430 additions and 187 deletions

View file

@ -61,7 +61,7 @@ pub fn run_with_ctx<T>(
.map(|p| TypstFileId::new(None, VirtualPath::new(p.strip_prefix(&root).unwrap())))
.collect::<Vec<_>>();
let mut ctx = Arc::new(Analysis::default()).snapshot(root, w.snapshot(), &());
let mut ctx = Arc::new(Analysis::default()).snapshot(w.snapshot(), &());
ctx.test_completion_files(Vec::new);
ctx.test_files(|| paths);
f(&mut ctx, p)