Cap & rotor isn't a bad idea, but idle is controlled by 2 things on your car...
The idle air control valve (IACV) is on the back of the intake manifold, the fast-idle thermo valve (FITV) is underneath the throttle body. Either one could be dirty & sticking. Clean em with carb cleaner. Sometimes the IACV is just bad, so cleaning doesn't fix it. Sometimes parts of the FITV come loose inside, look for stuff that's coming apart & rattling.