def Response( self ): if not self._response_future: return {} response = self.HandleFuture( self._response_future, truncate_message = True ) if not response: return {} # Vim may not be able to convert the 'errors' entry to its internal format # so we remove it from the response. errors = response.pop( 'errors', [] ) for e in errors: exception = MakeServerException( e ) _logger.error( exception ) DisplayServerException( exception, truncate_message = True ) return response.get( 'signature_help' ) or {}
def RawResponse(self): if not self._response_future: return {'completions': [], 'completion_start_column': -1} response = self.HandleFuture(self._response_future, truncate_message=True) if not response: return {'completions': [], 'completion_start_column': -1} # Vim may not be able to convert the 'errors' entry to its internal format # so we remove it from the response. errors = response.pop('errors', []) for e in errors: exception = MakeServerException(e) _logger.error(exception) DisplayServerException(exception, truncate_message=True) return response
def Response(self): response = self.HandleFuture(self._response_future, truncate_message=True, display_message=True) if not response or not response['completion']: return {'completion': []} # Vim may not be able to convert the 'errors' entry to its internal format # so we remove it from the response. errors = response.pop('errors', []) for e in errors: exception = MakeServerException(e) _logger.error(exception) DisplayServerException(exception, truncate_message=True) response['completion'] = ConvertCompletionDataToVimData( response['completion']) return response
def _RawResponse(self): if not self._response_future: return NO_COMPLETIONS response = self.HandleFuture(self._response_future, truncate_message=True) if not response: return NO_COMPLETIONS # Vim may not be able to convert the 'errors' entry to its internal format # so we remove it from the response. errors = response.pop('errors', []) for e in errors: exception = MakeServerException(e) _logger.error(exception) DisplayServerException(exception, truncate_message=True) response['line'] = self.request_data['line_num'] response['column'] = self.request_data['column_num'] return response