Add the onion and cook for 3–4 minutes until softened, then add the garlic and cook for a further minute. Reserve half a cup of pasta water before draining. Add the drained pasta to the pan along with the parmesan and a splash of the reserved pasta water. Toss continuously until a glossy sauce forms, adding more pasta water as needed to loosen it. Pour in the white wine (or a splash of pasta water) and lemon juice, and simmer for 1–2 minutes.