Whizz the onion in a food processor with the coriander, cumin, turmeric and 100ml water, until a paste is formed.
Heat the oil in a large sauté pan or shallow casserole dish. Add the onion paste, tomatoes, sugar and 1 tsp salt. Simmer together for 5 minutes, stirring.
Stir in the ginger, garlic, chopped chilli and coconut milk. Bring to a simmer, then add the chicken thighs. Cover and gently simmer for 15 minutes.
Remove the lid, increase the heat and simmer for a further 5-10 minutes or until the sauce has thickened. Stir in the lime juice and coriander. Serve with rice.