Weight + Pregnancy

Is it possible to lose weight during pregnancy?
Morning sickness and aversions made me gain weight, whereas I had lost 30+ lbs before pregnancy.
Now that the morning sickness is kind of gone, I want to start eating like I did before pregnancy: 3 cups veggies, 2 cups fruit, 1 cup carbs, 3 cups protein, 1/4 cup healthy fats and of course lots of water.
I guess I'm just worried because I also suffer from migraines which causes me to deviate from that (crackers, soup, ginger ale, etc). Which always discourages me. 
I want to give up pickles, ice cream, and bad breakfast sandwiches!
😣😣 idk I guess I just want some advice or encouragement. I gained about 16 lbs in my first trimester and I'm just worried for the rest of this pregnancy!