aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-07-01 14:08:25 +0100
committerGitHub <[email protected]>2020-07-01 14:08:25 +0100
commit3f94ad332aa22252a46d948888f5b23c0e21cd38 (patch)
tree8ba9457b48fa73741f9639c5ff6d8baa152a6aac /crates
parente080c19cca52b56ffc62988518faeaabf9c021be (diff)
parentc9f878962a7c9d1c33d5834a1dce2106c9286699 (diff)
Merge #5169
5169: Add reload workspace command r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates')
-rw-r--r--crates/rust-analyzer/src/lsp_ext.rs6
-rw-r--r--crates/rust-analyzer/src/main_loop.rs2
2 files changed, 4 insertions, 4 deletions
diff --git a/crates/rust-analyzer/src/lsp_ext.rs b/crates/rust-analyzer/src/lsp_ext.rs
index 1befe678c..82207bbb8 100644
--- a/crates/rust-analyzer/src/lsp_ext.rs
+++ b/crates/rust-analyzer/src/lsp_ext.rs
@@ -14,12 +14,12 @@ impl Request for AnalyzerStatus {
14 const METHOD: &'static str = "rust-analyzer/analyzerStatus"; 14 const METHOD: &'static str = "rust-analyzer/analyzerStatus";
15} 15}
16 16
17pub enum CollectGarbage {} 17pub enum ReloadWorkspace {}
18 18
19impl Request for CollectGarbage { 19impl Request for ReloadWorkspace {
20 type Params = (); 20 type Params = ();
21 type Result = (); 21 type Result = ();
22 const METHOD: &'static str = "rust-analyzer/collectGarbage"; 22 const METHOD: &'static str = "rust-analyzer/reloadWorkspace";
23} 23}
24 24
25pub enum SyntaxTree {} 25pub enum SyntaxTree {}
diff --git a/crates/rust-analyzer/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs
index 2ce1441b6..e3d49d24d 100644
--- a/crates/rust-analyzer/src/main_loop.rs
+++ b/crates/rust-analyzer/src/main_loop.rs
@@ -276,7 +276,7 @@ impl GlobalState {
276 self.register_request(&req, request_received); 276 self.register_request(&req, request_received);
277 277
278 RequestDispatcher { req: Some(req), global_state: self } 278 RequestDispatcher { req: Some(req), global_state: self }
279 .on_sync::<lsp_ext::CollectGarbage>(|s, ()| Ok(s.analysis_host.collect_garbage()))? 279 .on_sync::<lsp_ext::ReloadWorkspace>(|s, ()| Ok(s.reload()))?
280 .on_sync::<lsp_ext::JoinLines>(|s, p| handlers::handle_join_lines(s.snapshot(), p))? 280 .on_sync::<lsp_ext::JoinLines>(|s, p| handlers::handle_join_lines(s.snapshot(), p))?
281 .on_sync::<lsp_ext::OnEnter>(|s, p| handlers::handle_on_enter(s.snapshot(), p))? 281 .on_sync::<lsp_ext::OnEnter>(|s, p| handlers::handle_on_enter(s.snapshot(), p))?
282 .on_sync::<lsp_types::request::Shutdown>(|_, ()| Ok(()))? 282 .on_sync::<lsp_types::request::Shutdown>(|_, ()| Ok(()))?