getDocumentColor method
Requests all color information found in the document.
Sends a textDocument/documentColor request for the document at
filePath. The server typically returns a list of color information
(ranges and color values) in response['result']. This method returns
the raw server response as a map; callers should read response['result']
to obtain the list of color entries.
Implementation
Future<Map<String, dynamic>> getDocumentColor(String filePath) async {
if (!capabilities.documentColor) return {'result': []};
final response = await _sendRequest(
method: "textDocument/documentColor",
params: {
'textDocument': {'uri': Uri.file(filePath).toString()},
},
);
return response;
}