This is a very simple version I used to make all the time. I've lost the cookbook I originally got it from, but I found the recipe (the exact one I used to use) online, attributed to David Rosengarten.
1 cup green or brown lentils (French lentils make this extra good)
1 quart cold water
3 large white onions, sliced into thin half moons
1/2 cup olive oil
1/2 cup basmati or jasmine rice
1 tsp. salt
1 tsp. allspice
Put the lentils and water in a pot, bring to a boil, then turn heat to low and simmer, loosely covered, for 25 minutes or so.
Cook the onions in the oil in a skillet or wide shallow pan until they're soft, five or ten minutes. Then take 1.5 cups of onions out with a slotted spoon and set them aside.
Cook the rest until they're caramelized--brown and slightly crisp. This can take a while. The original recipe said something like ten minutes, but in my experience it can take twenty or more. Once they start to brown, watch them closely! If you see one or two blackened bits, take them out quickly, or they'll taste burnt. Set them to drain on paper towels or brown paper bags.
When the lentils have simmered about 25 minutes and are still a bit undercooked, drain them over a big bowl to catch the cooking liquid. Reserve 1.5 cups of it. If there's not enough, make up the difference with water.
Put the lentils and 1.5 cups of liquid back into the pan, add the 1.5 cups softened onions, along with rice, salt and allspice. Bring back to a boil, lower to a simmer and cook loosely covered until the rice is done, 20 minutes. Top with the caramelized onions.
Note: To make this with brown rice, put the uncooked rice in the pot at the same time as the lentils.