You should have both.
They work differently. The shop vac has high pressure, but low air volume. It will connect to hand tools and grab a lot of the stuff they throw off, but it won't move enough air to capture fine dust from larger power tools. The dust collector moves a lot of air at low pressure. It takes a lot of power to move enough air at sufficient pressure to capture airborne dust.
My setup has evolved to a 3HP Oneida cyclone dust collector with HEPA filter, a shop vac for small tools, and a Jet ceiling mount air filter. The ceiling mount doesn't get the really small stuff. I run the Oneida to get the small stuff, and I wear a respirator, too. I would like to have a 5hp Oneida, but I don't have the space.
Don't trust CFM ratings for dust collectors, or horsepower ratings for shop vacs. A 1000 CFM bag-style filter is not moving 1000 CFM at the tool, where it counts. If you can exhaust air outside, great... but then you've got the junk going outside. If you exhaust inside, get a HEPA canister filter.
This stuff is expensive and a dust collector is certainly less fun than, e.g., a new table saw... but it's pretty important. I wish I had gotten one sooner.