mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-07-19 02:35:00 +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
|
@ -15,7 +15,7 @@ pub mod syntax;
|
|||
pub mod ty;
|
||||
mod upstream;
|
||||
|
||||
pub use analysis::AnalysisContext;
|
||||
pub use analysis::{LocalContext, LocalContextGuard};
|
||||
pub use upstream::with_vm;
|
||||
|
||||
mod diagnostics;
|
||||
|
@ -119,7 +119,7 @@ pub trait SemanticRequest {
|
|||
type Response;
|
||||
|
||||
/// Request the information from the given context.
|
||||
fn request(self, ctx: &mut AnalysisContext) -> Option<Self::Response>;
|
||||
fn request(self, ctx: &mut LocalContext) -> Option<Self::Response>;
|
||||
}
|
||||
|
||||
/// A request handler with given (semantic) analysis context and a versioned
|
||||
|
@ -131,7 +131,7 @@ pub trait StatefulRequest {
|
|||
/// Request the information from the given context.
|
||||
fn request(
|
||||
self,
|
||||
ctx: &mut AnalysisContext,
|
||||
ctx: &mut LocalContext,
|
||||
doc: Option<VersionedDocument>,
|
||||
) -> Option<Self::Response>;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue