Although this Caribbean staple is called Rice and Peas it is, in fact, rice and beans. Traditionally gungo peas - also called gunga peas, Congo peas, no-eye peas or, most familiarly, pigeon peas - are used but don't make it a sticking point. I've often used black-eyed peas, and once or twice cranberry or kidney beans. The truth is, as the song almost has it, any bean will do.
Drain and rinse the gungo peas, and heat the oil in a heavy based saucepan that has a lid. Fry the onion for about 5 minutes, stirring every now and again, letting it soften and brown a little. Then add the chopped chile and garlic, and give everything a good stir around. Now stir in the rice, making sure it is all slicked with oil, then pour in the coconut milk and chicken or vegetable broth and stir in the drained gungo peas. Bring to a bubble, clamp on the lid, and turn down the heat to very low and let it cook gently for 15 minutes.
Check the rice is cooked through and the liquid is all absorbed - give the rice another 5 minutes if it needs it. Sprinkle with the freshly chopped thyme and season with salt if desired, forking it through.