Soften the onion. Warm the olive oil in a Dutch oven over medium heat. Add the onion and cook for 5–6 minutes, stirring occasionally, until soft and translucent.
Warm the spices. Stir in the garlic, curry powder, coriander, turmeric, paprika, cumin and 1 teaspoon of the salt. Cook for about 1 minute, stirring, until fragrant.
Simmer the lentils. Rinse the lentils under cold running water in a fine-mesh sieve and drain. Add them to the pot with the vegetable stock and bring to a simmer. Reduce the heat to medium-low, cover and cook for about 20 minutes, until the lentils are tender and have absorbed most of the stock. Stir once or twice, scraping the bottom of the pot.
Add the tomatoes and coconut milk. Stir in the tomatoes and their juices, coconut milk and sugar. Simmer gently for about 10 minutes with the lid slightly ajar, stirring occasionally, until the dahl is creamy and spoonable.
Taste and serve. Add more salt if needed. Spoon over warm basmati rice and finish with fresh cilantro or cayenne pepper for a nice kick.