Car idles low then truns Off!!!

This just happened today, i turned my car off ot go into the Grocery store to get something. Wheni came out and started teh car it started and then slowely the idle went down and turned off. I tried starting it agian and it did the saem thing… The third time i wated about like 20 seconds and then it startred right up But idled real low for a minuite or so and then when i strarted driving everything fixed up. I am not sure why this happened? I looked at alot of the other threads but they talked about low idles only. I was thinking that it could be the fuel filter? Any other suggestions. By the way i have a 1992 GSR

For this particular problem, I would say fuel filter too because the low idle seems like it was an indirect problem of the car not being able to stay running.

Also might wanna check the main fuel relay. could be going out. there are a million threads on here about that because its so common