Beiser gives an interesting account of the conflict between the neo-Kantians and the Materialists. Here’s an excerpt from Beiser's book The Genesis of Neo-Kantianism, 1796-1880:
"Materialism had become a powerful intellectual force in Germany during the 1850s in the wake oof the materialism controversy. The writings of Ludwig Buchner (1824—1899), Heinrich Czolbe (1819—1873), Karl Vogt (1817—1895) and Jakob Moleschott (1822—1893) had become popular, spreading the message far and wide that materialism is the new philosophy of the natural sciences. The Kantian counter-attack against materialism, which began in the 1860s in the works of Jurgen Bona Meyer and Friedrich Lange, effectively blocked the materialist advance. The neo-Kantians put forward two powerful arguments against the materialists: first, they could never bridge the chasm between matter and consciousness; and second, they were naive and dogmatic, simply assuming the reality of matter, as if it were a pure given, completely ignoring the physiological and intellectual conditions of knowledge in the world." (Chapter 2: "The Rise of Neo-Kantianism")Beiser notes that by the 1870s, the neo-Kantians seem to have triumphed. They had defeated their two main rivals, materialism and speculative idealism.