handleCompletionGetSuggestions method

  1. @override
Future<CompletionGetSuggestionsResult> handleCompletionGetSuggestions(
  1. CompletionGetSuggestionsParams parameters
)
override

Handle a 'completion.getSuggestions' request.

Throw a RequestFailure if the request could not be handled.

Implementation

@override
Future<CompletionGetSuggestionsResult> handleCompletionGetSuggestions(
    CompletionGetSuggestionsParams parameters) async {
  var path = parameters.file;
  var request = await getCompletionRequest(parameters);
  var generator = CompletionGenerator(getCompletionContributors(path));
  var result = await generator.generateCompletionResponse(request);
  result.sendNotifications(channel);
  return result.result!;
}