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:
Myriad-Dreamin 2024-10-31 10:07:31 +08:00 committed by GitHub
parent 1c1bc19caf
commit 8f3566366e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
44 changed files with 694 additions and 790 deletions

View file

@ -15,7 +15,7 @@ pub struct CodeLensRequest {
impl SemanticRequest for CodeLensRequest {
type Response = Vec<CodeLens>;
fn request(self, ctx: &mut AnalysisContext) -> Option<Self::Response> {
fn request(self, ctx: &mut LocalContext) -> Option<Self::Response> {
let source = ctx.source_by_path(&self.path).ok()?;
let doc_start = ctx.to_lsp_range(0..0, &source);