Add sugar and yeast in the water and proof it till it becomes foamy. Whisk the flour and salt together.
Tip the flour and yeast mixture in a standing mixer bowl. Add in the oil and knead the dough using a hook attachment.
Knead the dough for 8-10 minutes. Cover the bowl with a cling wrap and keep it for 30 minutes for the first rise.
After 30 minutes, using a little bit of oil start pulling the sides of the dough. Use a little bit of oil if the dough is sticking to fingers. Pick the dough and slap it 2-3 times in the bowl. Repeat this process for 5 minutes. Cover the bowl with a cling wrap or a towel and keep it for the second rise for an hour or till the dough has doubled in size.
Generously oil the baking pan you are using and tip the dough in it. Stretch it out in a rectangle shape.
Use your fingertips and knuckles to make indentations and in each dimple sprinkle the chopped rosemary and oil. Sprinkle salt and onions all over. Keep it covered for the final rise for 45 minutes to 1 hour.
In the last 10 minutes of the rise preheat the oven to 220C/425F. After the dough has doubled in size, bake it in the preheated oven for 20-25 minutes or till golden.
Let it cool in the pan and serve it with a good quality olive oil and balsamic vinegar or whatever you fancy.