Bring a large pot of salted water to a boil. Cook the pasta according to package instructions until al dente. Reserve ½ cup of pasta water, then drain and set aside.
In a large skillet, heat the olive oil and butter over medium heat. Add the sliced onions and sugar. Cook, stirring occasionally, for 20–25 minutes until the onions are golden and caramelized. Season with salt and pepper.
Stir in the minced garlic and cook for 1 minute. Add the chili oil and mix well, letting the flavors meld for another minute.
Add the cooked pasta to the skillet along with the reserved pasta water. Toss to coat the pasta evenly in the caramelized onion and chili oil mixture.
Divide the pasta into bowls and top with grated Parmesan cheese and fresh parsley if desired. Serve immediately for a flavorful and spicy delight.
