Furthermore, the wording of the spec does not tell me what this feature is for (apparently something like 'mark occurrences'), so, it's unclear to me at the moment.
The distinction between read/write/text is unclear to me, too. What is it useful for exactly? (Would be good to know so that I know how to map it to my language.)
And, the vscode apparently also expects a collection of elements as return value, as noted by @cdietrich:
export interface DocumentHighlightProvider {
provideDocumentHighlights(model: editor.IReadOnlyModel, position: Position, token: CancellationToken): DocumentHighlight[] | Thenable<DocumentHighlight[]>;
}