Make the pickled onions by heating up the vinegar in a small saucepan with the water, sugar and ¼ teaspoon salt. Once the sugar has dissolved, set aside to cool and then add the onions. Leave to pickle for at least an hour, or make up to 3 days ahead, keeping refrigerated.
Place all the ingredients for the dip in the large bowl of a food processor, along with ¼ teaspoon of salt and a good grind of pepper. Pulse until you have a coarse mixture (you want some texture, so don’t make it super smooth).
Spoon the dip into a large shallow bowl, drizzle over some oil and top with half of the pickled onions. Serve the remaining on the side or save for another use.