File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -870,10 +870,15 @@ def handle_work_done_progress_message(self, message):
870
870
def handle_register_capability_message (self , message ):
871
871
if "method" in message and message ["method" ] in ["client/registerCapability" ]:
872
872
try :
873
- if message ["params" ]["registrations" ][0 ]["id" ] == "workspace/didChangeWatchedFiles" :
874
- workspace_watch_files = self .parse_workspace_watch_files (message ["params" ])
875
- self .monitor_workspace_files (workspace_watch_files )
876
- log_time ("Add workspace watch files: {}" .format (workspace_watch_files ))
873
+ for registration in message ["params" ]["registrations" ]:
874
+ if registration ["id" ] == "workspace/didChangeWatchedFiles" :
875
+ workspace_watch_files = self .parse_workspace_watch_files (message ["params" ])
876
+ self .monitor_workspace_files (workspace_watch_files )
877
+ log_time ("Add workspace watch files: {}" .format (workspace_watch_files ))
878
+ elif registration ["id" ] == "textDocument/formatting" :
879
+ self .code_format_provider = True
880
+ elif registration ["id" ] == "textDocument/rangeFormatting" :
881
+ self .range_format_provider = True
877
882
except :
878
883
log_time (traceback .format_exc ())
879
884
You can’t perform that action at this time.
0 commit comments