documentHighlight method

Future<List<DocumentHighlight>> documentHighlight(
  1. String uri,
  2. Position position
)

Every occurrence to highlight for the symbol at position in uri.

Implementation

Future<List<DocumentHighlight>> documentHighlight(
  String uri,
  Position position,
) async {
  final r = await _positional(
    'textDocument/documentHighlight',
    uri,
    position,
  );
  return [
    for (final h in (r as List?) ?? const [])
      DocumentHighlight.fromJson((h as Map).cast<String, Object?>()),
  ];
}