resolveCompletionItem method
Resolves and retrieves additional details for the given LSP completion item.
Sends a completionItem/resolve request to the language server (when
supported) and merges any returned fields (for example documentation,
detail, and additionalTextEdits) into the provided completion item.
The resolved item is returned so callers can use the enriched information (for example to display rich documentation, apply additional text edits, or show a more descriptive detail string).
Returns a Future that completes with the resolved completion item. Throws an exception if the resolve request fails or the server returns an error.
Implementation
Future<Map<String, dynamic>> resolveCompletionItem(
Map<String, dynamic> item,
) async {
final response = await _sendRequest(
method: 'completionItem/resolve',
params: item,
);
return response['result'] ?? item;
}