While the lentils are cooking, heat the oil or water in a medium skillet over medium heat. Add the onion, cover, and cook until softened, about 5 minutes. Add the garlic, ginger, and chile, and cook until fragrant, about 30 seconds. Add the cumin, coriander, garam masala, cardamom, if using, and tomatoes, stirring constantly for about 30 seconds longer. Stir in the spinach, coconut milk, and cilantro and simmer for 5 minutes. Add the spinach mixture to the lentils and stir well to combine. Taste to adjust the seasonings, if needed. Serve hot.