Heat the oil in a wide, lidded frying pan, then soften the onion for 5 mins. Increase the heat a little, stir in the ginger, garlic, chili and lemongrass, and cook for 2 mins. Add the spices and sugar, and continue stirring. When the sugar starts to melt and everything starts to clump together, add the coconut milk, bring to a simmer.