getDocumentLinks method
Retrieves document links such as import paths and URLs.
These links can be clicked to open files or external resources.
Implementation
Future<List<dynamic>> getDocumentLinks(String filePath) async {
final response = await _sendRequest(
method: 'textDocument/documentLink',
params: {
'textDocument': {'uri': Uri.file(filePath).toString()},
},
);
final result = response['result'];
if (result is! List) return [];
return result;
}