Malagasy Coconut Lentils

Serves 4

2 tablespoons refined coconut oil 

1 large yellow onion, finely chopped (about 2 cups) 

3 plum tomatoes, peeled and chopped (about 1 cup) 

3 garlic cloves, finely chopped (about 1 tablespoon) 

1 tablespoon grated peeled fresh ginger (from 1 [2 1/2-inch] piece) 

1 teaspoon ground turmeric 

1/2 pound dried red lentils (about 1 1/4 cups), rinsed and drained 

1 1/2 cups water 

1 1/2 cups well-stirred unsweetened coconut milk 

2 teaspoons kosher salt, plus more to taste 

1 teaspoon grated lemon zest plus 2 tablespoons fresh lemon juice 

1 teaspoon black pepper, plus more for garnish 

1/4 teaspoon cayenne pepper, plus more to taste (optional) 

Chopped fresh flat-leaf parsley, for garnish 

Steamed white rice, for serving