aboutsummaryrefslogtreecommitdiff
path: root/crates/rust-analyzer/src/main_loop.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-04-02 08:52:27 +0100
committerAleksey Kladov <[email protected]>2020-04-02 08:52:27 +0100
commit309fc701559088d630121ffccb114422ff18460c (patch)
tree3085937d6fd158ff41b10e04a6fff764d2e440a9 /crates/rust-analyzer/src/main_loop.rs
parentf696df379a5dd450b3d89a8c690de5f8d78f6be2 (diff)
Remove old syntax highlighting
Diffstat (limited to 'crates/rust-analyzer/src/main_loop.rs')
-rw-r--r--crates/rust-analyzer/src/main_loop.rs20
1 files changed, 1 insertions, 19 deletions
diff --git a/crates/rust-analyzer/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs
index 45ae0ad9d..47fef59d4 100644
--- a/crates/rust-analyzer/src/main_loop.rs
+++ b/crates/rust-analyzer/src/main_loop.rs
@@ -250,9 +250,7 @@ impl fmt::Debug for Event {
250 } 250 }
251 } 251 }
252 Event::Task(Task::Notify(not)) => { 252 Event::Task(Task::Notify(not)) => {
253 if notification_is::<req::PublishDecorations>(not) 253 if notification_is::<req::PublishDiagnostics>(not) {
254 || notification_is::<req::PublishDiagnostics>(not)
255 {
256 return debug_verbose_not(not, f); 254 return debug_verbose_not(not, f);
257 } 255 }
258 } 256 }
@@ -427,7 +425,6 @@ fn loop_turn(
427 update_file_notifications_on_threadpool( 425 update_file_notifications_on_threadpool(
428 pool, 426 pool,
429 world_state.snapshot(), 427 world_state.snapshot(),
430 world_state.config.publish_decorations,
431 task_sender.clone(), 428 task_sender.clone(),
432 loop_state.subscriptions.subscriptions(), 429 loop_state.subscriptions.subscriptions(),
433 ) 430 )
@@ -508,7 +505,6 @@ fn on_request(
508 .on::<req::GotoTypeDefinition>(handlers::handle_goto_type_definition)? 505 .on::<req::GotoTypeDefinition>(handlers::handle_goto_type_definition)?
509 .on::<req::ParentModule>(handlers::handle_parent_module)? 506 .on::<req::ParentModule>(handlers::handle_parent_module)?
510 .on::<req::Runnables>(handlers::handle_runnables)? 507 .on::<req::Runnables>(handlers::handle_runnables)?
511 .on::<req::DecorationsRequest>(handlers::handle_decorations)?
512 .on::<req::Completion>(handlers::handle_completion)? 508 .on::<req::Completion>(handlers::handle_completion)?
513 .on::<req::CodeActionRequest>(handlers::handle_code_action)? 509 .on::<req::CodeActionRequest>(handlers::handle_code_action)?
514 .on::<req::CodeLensRequest>(handlers::handle_code_lens)? 510 .on::<req::CodeLensRequest>(handlers::handle_code_lens)?
@@ -884,7 +880,6 @@ where
884fn update_file_notifications_on_threadpool( 880fn update_file_notifications_on_threadpool(
885 pool: &ThreadPool, 881 pool: &ThreadPool,
886 world: WorldSnapshot, 882 world: WorldSnapshot,
887 publish_decorations: bool,
888 task_sender: Sender<Task>, 883 task_sender: Sender<Task>,
889 subscriptions: Vec<FileId>, 884 subscriptions: Vec<FileId>,
890) { 885) {
@@ -904,19 +899,6 @@ fn update_file_notifications_on_threadpool(
904 } 899 }
905 } 900 }
906 } 901 }
907 if publish_decorations {
908 match handlers::publish_decorations(&world, file_id) {
909 Err(e) => {
910 if !is_canceled(&e) {
911 log::error!("failed to compute decorations: {:?}", e);
912 }
913 }
914 Ok(params) => {
915 let not = notification_new::<req::PublishDecorations>(params);
916 task_sender.send(Task::Notify(not)).unwrap();
917 }
918 }
919 }
920 } 902 }
921 }); 903 });
922} 904}