This is a very common problem after the battery has been disconnected or run dead. Most of what is in the Engine Computer's memory will be relearned right away, except for "minimum throttle". Until that is learned, idle speed will be too low and cause exactly the symptoms you described.
To meet the conditions for the relearn to take place, drive at highway speed with the engine warmed up, then coast for at least seven seconds without touching the pedals.
SPONSORED LINKS
Wednesday, November 7th, 2018 AT 9:51 PM