mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-11-23 20:56:42 +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
|
|
@ -26,7 +26,7 @@ impl StatefulRequest for ReferencesRequest {
|
|||
|
||||
fn request(
|
||||
self,
|
||||
ctx: &mut AnalysisContext,
|
||||
ctx: &mut LocalContext,
|
||||
doc: Option<VersionedDocument>,
|
||||
) -> Option<Self::Response> {
|
||||
let source = ctx.source_by_path(&self.path).ok()?;
|
||||
|
|
@ -40,7 +40,7 @@ impl StatefulRequest for ReferencesRequest {
|
|||
}
|
||||
|
||||
pub(crate) fn find_references(
|
||||
ctx: &mut AnalysisContext,
|
||||
ctx: &mut LocalContext,
|
||||
source: &Source,
|
||||
doc: Option<&VersionedDocument>,
|
||||
target: DerefTarget<'_>,
|
||||
|
|
@ -69,13 +69,13 @@ pub(crate) fn find_references(
|
|||
}
|
||||
}
|
||||
|
||||
struct ReferencesWorker<'a, 'w> {
|
||||
ctx: SearchCtx<'a, 'w>,
|
||||
struct ReferencesWorker<'a> {
|
||||
ctx: SearchCtx<'a>,
|
||||
references: Vec<LspLocation>,
|
||||
def: Definition,
|
||||
}
|
||||
|
||||
impl<'a, 'w> ReferencesWorker<'a, 'w> {
|
||||
impl<'a> ReferencesWorker<'a> {
|
||||
fn label_root(mut self) -> Option<Vec<LspLocation>> {
|
||||
let mut ids = vec![];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue