Or are they?
Technically they are both fruit.
If you really want to get technical then they are both. Vegetable is a culinary term, not a scientific one. Culinarily speaking tomatoes and peppers are vegetables even as scientifically speaking they are fruits. They don't fit the culinary definition for fruits and there is no scientific definition for vegetables, thus they are both simultaneously.
From what I gather, culinarily vegetables refers to True vegetables and savory fruit.
Separate names with a comma.