diff options
author | Aleksey Kladov <[email protected]> | 2020-05-10 18:25:37 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-05-10 18:27:12 +0100 |
commit | 3bec2be9de400dc044ae924cb0ae36faa454d111 (patch) | |
tree | 4112350b871554073f17ba556f2f557c39e578c4 /crates/rust-analyzer/src/main_loop.rs | |
parent | bec3bf701c9e7d0a99c5a89e5c95ce543ce21dbe (diff) |
req -> lsp_ext
Diffstat (limited to 'crates/rust-analyzer/src/main_loop.rs')
-rw-r--r-- | crates/rust-analyzer/src/main_loop.rs | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/crates/rust-analyzer/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs index 333ecc859..fa72a9cc6 100644 --- a/crates/rust-analyzer/src/main_loop.rs +++ b/crates/rust-analyzer/src/main_loop.rs | |||
@@ -38,12 +38,11 @@ use threadpool::ThreadPool; | |||
38 | use crate::{ | 38 | use crate::{ |
39 | config::{Config, FilesWatcher}, | 39 | config::{Config, FilesWatcher}, |
40 | diagnostics::DiagnosticTask, | 40 | diagnostics::DiagnosticTask, |
41 | from_proto, | 41 | from_proto, lsp_ext, |
42 | main_loop::{ | 42 | main_loop::{ |
43 | pending_requests::{PendingRequest, PendingRequests}, | 43 | pending_requests::{PendingRequest, PendingRequests}, |
44 | subscriptions::Subscriptions, | 44 | subscriptions::Subscriptions, |
45 | }, | 45 | }, |
46 | req, | ||
47 | world::{WorldSnapshot, WorldState}, | 46 | world::{WorldSnapshot, WorldState}, |
48 | Result, | 47 | Result, |
49 | }; | 48 | }; |
@@ -502,26 +501,27 @@ fn on_request( | |||
502 | request_received, | 501 | request_received, |
503 | }; | 502 | }; |
504 | pool_dispatcher | 503 | pool_dispatcher |
505 | .on_sync::<req::CollectGarbage>(|s, ()| Ok(s.collect_garbage()))? | 504 | .on_sync::<lsp_ext::CollectGarbage>(|s, ()| Ok(s.collect_garbage()))? |
506 | .on_sync::<req::JoinLines>(|s, p| handlers::handle_join_lines(s.snapshot(), p))? | 505 | .on_sync::<lsp_ext::JoinLines>(|s, p| handlers::handle_join_lines(s.snapshot(), p))? |
507 | .on_sync::<req::OnEnter>(|s, p| handlers::handle_on_enter(s.snapshot(), p))? | 506 | .on_sync::<lsp_ext::OnEnter>(|s, p| handlers::handle_on_enter(s.snapshot(), p))? |
508 | .on_sync::<lsp_types::request::SelectionRangeRequest>(|s, p| { | 507 | .on_sync::<lsp_types::request::SelectionRangeRequest>(|s, p| { |
509 | handlers::handle_selection_range(s.snapshot(), p) | 508 | handlers::handle_selection_range(s.snapshot(), p) |
510 | })? | 509 | })? |
511 | .on_sync::<req::FindMatchingBrace>(|s, p| { | 510 | .on_sync::<lsp_ext::FindMatchingBrace>(|s, p| { |
512 | handlers::handle_find_matching_brace(s.snapshot(), p) | 511 | handlers::handle_find_matching_brace(s.snapshot(), p) |
513 | })? | 512 | })? |
514 | .on::<req::AnalyzerStatus>(handlers::handle_analyzer_status)? | 513 | .on::<lsp_ext::AnalyzerStatus>(handlers::handle_analyzer_status)? |
515 | .on::<req::SyntaxTree>(handlers::handle_syntax_tree)? | 514 | .on::<lsp_ext::SyntaxTree>(handlers::handle_syntax_tree)? |
516 | .on::<req::ExpandMacro>(handlers::handle_expand_macro)? | 515 | .on::<lsp_ext::ExpandMacro>(handlers::handle_expand_macro)? |
516 | .on::<lsp_ext::ParentModule>(handlers::handle_parent_module)? | ||
517 | .on::<lsp_ext::Runnables>(handlers::handle_runnables)? | ||
518 | .on::<lsp_ext::InlayHints>(handlers::handle_inlay_hints)? | ||
517 | .on::<lsp_types::request::OnTypeFormatting>(handlers::handle_on_type_formatting)? | 519 | .on::<lsp_types::request::OnTypeFormatting>(handlers::handle_on_type_formatting)? |
518 | .on::<lsp_types::request::DocumentSymbolRequest>(handlers::handle_document_symbol)? | 520 | .on::<lsp_types::request::DocumentSymbolRequest>(handlers::handle_document_symbol)? |
519 | .on::<lsp_types::request::WorkspaceSymbol>(handlers::handle_workspace_symbol)? | 521 | .on::<lsp_types::request::WorkspaceSymbol>(handlers::handle_workspace_symbol)? |
520 | .on::<lsp_types::request::GotoDefinition>(handlers::handle_goto_definition)? | 522 | .on::<lsp_types::request::GotoDefinition>(handlers::handle_goto_definition)? |
521 | .on::<lsp_types::request::GotoImplementation>(handlers::handle_goto_implementation)? | 523 | .on::<lsp_types::request::GotoImplementation>(handlers::handle_goto_implementation)? |
522 | .on::<lsp_types::request::GotoTypeDefinition>(handlers::handle_goto_type_definition)? | 524 | .on::<lsp_types::request::GotoTypeDefinition>(handlers::handle_goto_type_definition)? |
523 | .on::<req::ParentModule>(handlers::handle_parent_module)? | ||
524 | .on::<req::Runnables>(handlers::handle_runnables)? | ||
525 | .on::<lsp_types::request::Completion>(handlers::handle_completion)? | 525 | .on::<lsp_types::request::Completion>(handlers::handle_completion)? |
526 | .on::<lsp_types::request::CodeActionRequest>(handlers::handle_code_action)? | 526 | .on::<lsp_types::request::CodeActionRequest>(handlers::handle_code_action)? |
527 | .on::<lsp_types::request::CodeLensRequest>(handlers::handle_code_lens)? | 527 | .on::<lsp_types::request::CodeLensRequest>(handlers::handle_code_lens)? |
@@ -534,7 +534,6 @@ fn on_request( | |||
534 | .on::<lsp_types::request::References>(handlers::handle_references)? | 534 | .on::<lsp_types::request::References>(handlers::handle_references)? |
535 | .on::<lsp_types::request::Formatting>(handlers::handle_formatting)? | 535 | .on::<lsp_types::request::Formatting>(handlers::handle_formatting)? |
536 | .on::<lsp_types::request::DocumentHighlightRequest>(handlers::handle_document_highlight)? | 536 | .on::<lsp_types::request::DocumentHighlightRequest>(handlers::handle_document_highlight)? |
537 | .on::<req::InlayHints>(handlers::handle_inlay_hints)? | ||
538 | .on::<lsp_types::request::CallHierarchyPrepare>(handlers::handle_call_hierarchy_prepare)? | 537 | .on::<lsp_types::request::CallHierarchyPrepare>(handlers::handle_call_hierarchy_prepare)? |
539 | .on::<lsp_types::request::CallHierarchyIncomingCalls>( | 538 | .on::<lsp_types::request::CallHierarchyIncomingCalls>( |
540 | handlers::handle_call_hierarchy_incoming, | 539 | handlers::handle_call_hierarchy_incoming, |
@@ -546,7 +545,7 @@ fn on_request( | |||
546 | .on::<lsp_types::request::SemanticTokensRangeRequest>( | 545 | .on::<lsp_types::request::SemanticTokensRangeRequest>( |
547 | handlers::handle_semantic_tokens_range, | 546 | handlers::handle_semantic_tokens_range, |
548 | )? | 547 | )? |
549 | .on::<req::Ssr>(handlers::handle_ssr)? | 548 | .on::<lsp_ext::Ssr>(handlers::handle_ssr)? |
550 | .finish(); | 549 | .finish(); |
551 | Ok(()) | 550 | Ok(()) |
552 | } | 551 | } |