1.Heat the oil in a large pot over medium heat. Add the onion and a pinch of salt and cook until soft and lightly browned around the edges, 8 to 10 minutes, reducing the heat to low as needed.
2.With the heat on low, add the garlic, ginger, curry powder, and red pepper flakes and cook, stirring, until fragrant, about 2 minutes.
3.Add the tomatoes, lentils, water, coconut milk, ½ teaspoon salt, and several grinds of black pepper. Bring to a boil, cover, and reduce to a simmer, stirring only occasionally, until the lentils are tender, 25 to 35 minutes. If your soup is too thick, stir in 1/2 to 1 cup more water to reach your desired consistency.
4.Stir in the cilantro and lime juice. Season to taste with salt and pepper and serve.