mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-08-03 17:58:17 +00:00
dev: cache expression information correctly (#736)
* dev: cache expression information correctly * rev
This commit is contained in:
parent
2c38695b6f
commit
1d49e110e2
18 changed files with 430 additions and 187 deletions
|
@ -1,3 +1,5 @@
|
|||
use reflexo_typst::EntryReader;
|
||||
|
||||
use crate::prelude::*;
|
||||
|
||||
/// Stores diagnostics for files.
|
||||
|
@ -32,7 +34,11 @@ fn convert_diagnostic(
|
|||
let source = ctx.world().source(id)?;
|
||||
lsp_range = diagnostic_range(&source, span, ctx.position_encoding());
|
||||
} else {
|
||||
uri = path_to_url(&ctx.local.root)?;
|
||||
let root = ctx
|
||||
.world
|
||||
.workspace_root()
|
||||
.ok_or_else(|| anyhow::anyhow!("no workspace root"))?;
|
||||
uri = path_to_url(&root)?;
|
||||
lsp_range = LspRange::default();
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue