Interstellar chemistry is important for galaxy formation, as it determines the rate at which gas can cool, and enables us to make predictions for observable spectroscopic lines from ions and molecules. We explore two central aspects of modelling the chemistry of the interstellar medium (ISM): (1) the effects of local stellar radiation, which ionizes and heats the gas, and (2) the depletion of metals on to dust grains, which reduces the abundance of metals in the gas phase. We run high-resolution (400 M⊙ per baryonic particle) simulations of isolated disc galaxies, from dwarfs to Milky Way-mass, using the FIRE galaxy formation models together with the CHIMES non-equilibrium chemistry and cooling module. In our fiducial model, we couple the c...