diff --git a/crates/rust-analyzer/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs index 3214bbd9e0..f2af7bc831 100644 --- a/crates/rust-analyzer/src/main_loop.rs +++ b/crates/rust-analyzer/src/main_loop.rs @@ -10,7 +10,7 @@ use always_assert::always; use crossbeam_channel::{select, Receiver}; use ide::{FileId, PrimeCachesProgress}; use ide_db::base_db::VfsPath; -use lsp_server::{Connection, Notification, Request, Response}; +use lsp_server::{Connection, Notification, Request}; use lsp_types::notification::Notification as _; use vfs::ChangeKind; @@ -60,7 +60,7 @@ enum Event { #[derive(Debug)] pub(crate) enum Task { - Response(Response), + Response(lsp_server::Response), Diagnostics(Vec<(FileId, Vec)>), PrimeCaches(PrimeCachesProgress), FetchWorkspace(ProjectWorkspaceProgress), @@ -466,7 +466,7 @@ impl GlobalState { self.register_request(&req, request_received); if self.shutdown_requested { - self.respond(Response::new_err( + self.respond(lsp_server::Response::new_err( req.id, lsp_server::ErrorCode::InvalidRequest as i32, "Shutdown already requested.".to_owned(), @@ -674,7 +674,7 @@ impl GlobalState { }, |this, resp| { log::debug!("config update response: '{:?}", resp); - let Response { error, result, .. } = resp; + let lsp_server::Response { error, result, .. } = resp; match (error, result) { (Some(err), _) => { diff --git a/docs/dev/architecture.md b/docs/dev/architecture.md index ee8f9253e5..9d1b098723 100644 --- a/docs/dev/architecture.md +++ b/docs/dev/architecture.md @@ -3,13 +3,8 @@ This document describes the high-level architecture of rust-analyzer. If you want to familiarize yourself with the code base, you are just in the right place! -See also the [guide](./guide.md), which walks through a particular snapshot of rust-analyzer code base. - -Yet another resource is this playlist with videos about various parts of the analyzer: - -https://www.youtube.com/playlist?list=PL85XCvVPmGQho7MZkdW-wtPtuJcFpzycE - -Note that the guide and videos are pretty dated, this document should be, in general, fresher. +You might also enjoy ["Explaining Rust Analyzer"](https://www.youtube.com/playlist?list=PLhb66M_x9UmrqXhQuIpWC5VgTdrGxMx3y) series on YouTube. +It goes deeper than what is covered in this document, but will take some time to watch. See also these implementation-related blog posts: @@ -19,6 +14,9 @@ See also these implementation-related blog posts: * https://rust-analyzer.github.io/blog/2020/09/28/how-to-make-a-light-bulb.html * https://rust-analyzer.github.io/blog/2020/10/24/introducing-ungrammar.html +For older, by now mostly outdated stuff, see the [guide](./guide.md) and [another playlist](https://www.youtube.com/playlist?list=PL85XCvVPmGQho7MZkdW-wtPtuJcFpzycE). + + ## Bird's Eye View ![](https://user-images.githubusercontent.com/4789492/107129398-0ab70f00-687a-11eb-9bfc-d4eb023aec06.png)