It depends on the context and the vegetable. Smaller vegetables are usually either singular or plural indicating how many to use. Larger vegetables can be countable or uncountable again depending on the context. In the market you would ask for a cabbage, but in a restaurant you would ask for some cabbage, or a portion of cabbage.
If you see a vegetable in the single form before a noun then it is being used as an adjective, carrot soup or onion soup. Remember that in English adjectives never change.
I hope this clarifies the position for you