mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-07-25 13:43:44 +00:00
refactor: refactor hover, analysis/global, and docs crates (#755)
* dev: refactor hover.rs * refactor refactor AnalysisContext * refactor: refactor docs crate
This commit is contained in:
parent
1c1bc19caf
commit
8f3566366e
44 changed files with 694 additions and 790 deletions
|
@ -61,7 +61,7 @@ impl StatefulRequest for CompletionRequest {
|
|||
|
||||
fn request(
|
||||
self,
|
||||
ctx: &mut AnalysisContext,
|
||||
ctx: &mut LocalContext,
|
||||
doc: Option<VersionedDocument>,
|
||||
) -> Option<Self::Response> {
|
||||
let doc = doc.as_ref().map(|doc| doc.document.as_ref());
|
||||
|
@ -331,8 +331,8 @@ mod tests {
|
|||
pkg_mode: bool,
|
||||
}
|
||||
|
||||
fn run(c: TestConfig) -> impl Fn(&mut AnalysisContext, PathBuf) {
|
||||
fn test(ctx: &mut AnalysisContext, id: TypstFileId) {
|
||||
fn run(c: TestConfig) -> impl Fn(&mut LocalContext, PathBuf) {
|
||||
fn test(ctx: &mut LocalContext, id: TypstFileId) {
|
||||
let source = ctx.source_by_id(id).unwrap();
|
||||
let rng = find_test_range(&source);
|
||||
let text = source.text()[rng.clone()].to_string();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue