Using dynamical density functional theory (DDFT) methods we investigate the laning instability of a sheared colloidal suspension. The nonequilibrium ordering at the laning transition is driven by nonaffine particle motion arising from interparticle interactions. Starting from a DDFT which incorporates the nonaffine motion, we perform a linear stability analysis that enables identification of the regions of parameter space where lanes form. We illustrate our general approach by applying it to a simple one-component fluid of soft penetrable particles.