A deep learning (DL)-based detector utilizing the Transformer framework is proposed for orthogonal frequency-division multiplexing with index modulation (OFDM-IM) systems, termed as TransIM. Concretely, TransIM adopts a two-step detection method. First, the neural networks with the Transformer block as the core provide soft probabilities of different transmitted symbols. Then, conventional signal detection methods are performed based on those probabilities to make final decisions. This method is verified to improve system error performance significantly, albeit at the cost of slightly increased complexity. Simulation results indicate that the proposed TransIM detector fares better than existing DL-based ones regarding bit error rate (BER) performance.