def ComputeCandidates( self, request_data ): if not self.ShouldUseNow( request_data ): return [] completions = self._completer.CandidatesForQueryAndType( ToUtf8IfNeeded( utils.SanitizeQuery( request_data[ 'query' ] ) ), ToUtf8IfNeeded( request_data[ 'filetypes' ][ 0 ] ) ) completions = completions[ : MAX_IDENTIFIER_COMPLETIONS_RETURNED ] completions = _RemoveSmallCandidates( completions, self.user_options[ 'min_num_identifier_candidate_chars' ] ) return [ responses.BuildCompletionData( x ) for x in completions ]
def CandidatesForQueryAsync(self, query, unused_start_column): filetype = self.GetFiletypeOrCommonGroup() self.completions_future = self.completer.CandidatesForQueryAndTypeAsync( utils.SanitizeQuery(query), filetype)
def CandidatesForQueryAsync(self, query, unused_start_column): filetype = vim.eval("&filetype") self.completions_future = self.completer.CandidatesForQueryAndTypeAsync( utils.SanitizeQuery(query), filetype)