@@ -282,6 +282,10 @@ pub enum Event {
282
282
buffer_abs_path : PathBuf ,
283
283
name : Option < LanguageServerName > ,
284
284
} ,
285
+ ToggleLspLogs {
286
+ server_id : LanguageServerId ,
287
+ enabled : bool ,
288
+ } ,
285
289
Toast {
286
290
notification_id : SharedString ,
287
291
message : String ,
@@ -1002,6 +1006,7 @@ impl Project {
1002
1006
client. add_entity_request_handler ( Self :: handle_open_buffer_by_path) ;
1003
1007
client. add_entity_request_handler ( Self :: handle_open_new_buffer) ;
1004
1008
client. add_entity_message_handler ( Self :: handle_create_buffer_for_peer) ;
1009
+ client. add_entity_message_handler ( Self :: handle_toggle_lsp_logs) ;
1005
1010
1006
1011
WorktreeStore :: init ( & client) ;
1007
1012
BufferStore :: init ( & client) ;
@@ -4699,6 +4704,20 @@ impl Project {
4699
4704
} ) ?
4700
4705
}
4701
4706
4707
+ async fn handle_toggle_lsp_logs (
4708
+ project : Entity < Self > ,
4709
+ envelope : TypedEnvelope < proto:: ToggleLspLogs > ,
4710
+ mut cx : AsyncApp ,
4711
+ ) -> Result < ( ) > {
4712
+ project. update ( & mut cx, |_, cx| {
4713
+ cx. emit ( Event :: ToggleLspLogs {
4714
+ server_id : LanguageServerId :: from_proto ( envelope. payload . server_id ) ,
4715
+ enabled : envelope. payload . enabled ,
4716
+ } )
4717
+ } ) ?;
4718
+ Ok ( ( ) )
4719
+ }
4720
+
4702
4721
async fn handle_synchronize_buffers (
4703
4722
this : Entity < Self > ,
4704
4723
envelope : TypedEnvelope < proto:: SynchronizeBuffers > ,
0 commit comments