documentSymbols method
The document outline: hierarchical symbols with their source ranges.
Implementation
Future<Map<String, Object?>> documentSymbols(
String language,
String source, {
String? uri,
}) => _withDoc(language, source, uri: uri, (lsp, docUri) async {
final symbols = await lsp.documentSymbols(docUri);
return <String, Object?>{
'symbols': symbols.map((s) => s.toJson()).toList(),
'isError': false,
};
});