Boil the lentils in plenty of water for 15 minutes. Drain.
Meanwhile, heat 1 tablespoon of the oil in a frying pan and fry the onion for 5 minutes. Stir in the garlic and fry for a further 2 minutes.
Add the lentils, rosemary or thyme, stock and a little salt and pepper to the frying pan and bring to the boil.
Pour into a shallow, ovenproof dish and arrange the fish on top. Score the tops of the tomatoes and tuck them around the fish. Drizzle with the remaining oil.
Bake, uncovered, in a preheated oven, 180°C (350°F), Gas Mark 4, for 25 minutes, or until the fish is cooked through. Serve sprinkled with the parsley.