In a large pot or Dutch oven, heat the butter and olive oil over medium heat.
Add the sliced onions to the pot. Sprinkle with salt and sugar, and cook for about 20 minutes, stirring occasionally, until the onions are caramelized and golden brown.
Stir in the dried thyme, pepper, and cook for another minute to release the flavors.
Pour in the vegetable broth and water. Bring the mixture to a boil, then reduce the heat and let it simmer for about 10 minutes.
While the soup is simmering, bring a separate pot of water to a boil. Cook the gnocchi according to the package instructions, usually for about 2-3 minutes until they float. Drain and set aside.
Once the soup has simmered, add the cooked gnocchi to the pot and stir to combine.
If desired, transfer the soup into an oven-safe baking dish. Sprinkle the shredded cheese evenly over the top.
Broil the soup in the oven for about 5 minutes, or until the cheese is melted and bubbly. Keep an eye on it to prevent burning.
Serve hot, garnished with fresh parsley if desired.