In all proceedings for the writ of habeas corpus or the writ of error coram nobis, the court having jurisdiction of those matters shall determine the question of indigency and appoint counsel, if necessary, in the manner set out in this part.
T.C.A. § 40-14-204