For general gauge theories, the total Lagrangian density is given as $$L=-\frac{1}{4}F^2+L_M(\psi, D\psi)$$ where $L_M(\psi, D\psi)$ is the matter field with the ordinary derivative replaced by the covariant derivative $D$. Here $\psi$ is a generic matter field other than the gauge field.
Then, for calculating the equation of motion for the matter field $\psi$, I am confused whether I have to calculate with $\partial_\mu \phi$ or $D_\mu \psi$. That is, which one is correct?:
\begin{equation} \frac{\partial L}{\partial\psi}-\partial_\mu \frac{\partial L}{\partial(\partial_\mu\psi)}=0,\tag{1} \end{equation}
\begin{equation} \frac{\partial L}{\partial\psi}-D_\mu \frac{\partial L}{\partial(D_\mu\psi)}=0.\tag{2} \end{equation}
This kind of stuff have always confused me...so I desperately feel a need to clarify.